17#ifndef __IOMAN_MOD_H__
18#define __IOMAN_MOD_H__
29extern int io_open(
const char *name,
int mode);
30extern int io_close(
int fd);
31extern int io_read(
int fd,
void *ptr,
size_t size);
32extern int io_write(
int fd,
void *ptr,
size_t size);
33extern int io_lseek(
int fd,
int pos,
int mode);
34extern int io_ioctl(
int fd,
unsigned long arg,
void *param);
35extern int io_remove(
const char *name);
36extern int io_mkdir(
const char *path);
37extern int io_rmdir(
const char *path);
38extern int io_dopen(
const char *path,
int mode);
39extern int io_dclose(
int fd);
41extern int io_getstat(
const char *name,
io_stat_t *stat);
42extern int io_chstat(
const char *name,
io_stat_t *stat,
unsigned int statmask);
43extern int io_format(
const char *dev);
48#define IOP_DT_CHAR 0x01
49#define IOP_DT_CONS 0x02
50#define IOP_DT_BLOCK 0x04
51#define IOP_DT_RAW 0x08
75#define IOMAN_RETURN_VALUE_IMPL(val) \
76 static inline int my_ioman_retval_##val##_int(void) {return -val;} \
77 static inline signed long long my_ioman_retval_##val##_s64(void) {return -val;}
78#define IOMAN_RETURN_VALUE(val) ((void*)&my_ioman_retval_##val##_int)
79#define IOMAN_RETURN_VALUE_S64(val) ((void*)&my_ioman_retval_##val##_s64)
102extern int io_DelDrv(
const char *name);
104#define ioman_mod_IMPORTS_start DECLARE_IMPORT_TABLE(ioman, 1, 1)
105#define ioman_mod_IMPORTS_end END_IMPORT_TABLE
107#define I_io_open DECLARE_IMPORT(4, io_open)
108#define I_io_close DECLARE_IMPORT(5, io_close)
109#define I_io_read DECLARE_IMPORT(6, io_read)
110#define I_io_write DECLARE_IMPORT(7, io_write)
111#define I_io_lseek DECLARE_IMPORT(8, io_lseek)
112#define I_io_ioctl DECLARE_IMPORT(9, io_ioctl)
113#define I_io_remove DECLARE_IMPORT(10, io_remove)
114#define I_io_mkdir DECLARE_IMPORT(11, io_mkdir)
115#define I_io_rmdir DECLARE_IMPORT(12, io_rmdir)
116#define I_io_dopen DECLARE_IMPORT(13, io_dopen)
117#define I_io_dclose DECLARE_IMPORT(14, io_dclose)
118#define I_io_dread DECLARE_IMPORT(15, io_dread)
119#define I_io_getstat DECLARE_IMPORT(16, io_getstat)
120#define I_io_chstat DECLARE_IMPORT(17, io_chstat)
121#define I_io_format DECLARE_IMPORT(18, io_format)
122#define I_io_AddDrv DECLARE_IMPORT(20, io_AddDrv);
123#define I_io_DelDrv DECLARE_IMPORT(21, io_DelDrv);
struct _iop_io_file iop_io_file_t
struct _iop_io_device * device