27extern int open(
const char *name,
int mode);
28extern int close(
int fd);
29extern int read(
int fd,
void *ptr,
size_t size);
30extern int write(
int fd,
void *ptr,
size_t size);
31extern int lseek(
int fd,
int pos,
int mode);
32extern int ioctl(
int fd,
int command,
void *arg);
33extern int remove(
const char *name);
34extern int mkdir(
const char *path);
35extern int rmdir(
const char *path);
36extern int dopen(
const char *path,
int mode);
37extern int dclose(
int fd);
39extern int getstat(
const char *name,
io_stat_t *stat);
40extern int chstat(
const char *name,
io_stat_t *stat,
unsigned int statmask);
41extern int format(
const char *dev);
46#define IOP_DT_CHAR 0x01
47#define IOP_DT_CONS 0x02
48#define IOP_DT_BLOCK 0x04
49#define IOP_DT_RAW 0x08
73#define IOMAN_RETURN_VALUE_IMPL(val) \
74 static inline int my_ioman_retval_##val##_int(void) {return -val;} \
75 static inline signed long long my_ioman_retval_##val##_s64(void) {return -val;}
76#define IOMAN_RETURN_VALUE(val) ((void*)&my_ioman_retval_##val##_int)
77#define IOMAN_RETURN_VALUE_S64(val) ((void*)&my_ioman_retval_##val##_s64)
100extern int DelDrv(
const char *name);
102#define ioman_IMPORTS_start DECLARE_IMPORT_TABLE(ioman, 1, 1)
103#define ioman_IMPORTS_end END_IMPORT_TABLE
105#define I_open DECLARE_IMPORT(4, open)
106#define I_close DECLARE_IMPORT(5, close)
107#define I_read DECLARE_IMPORT(6, read)
108#define I_write DECLARE_IMPORT(7, write)
109#define I_lseek DECLARE_IMPORT(8, lseek)
110#define I_ioctl DECLARE_IMPORT(9, ioctl)
111#define I_remove DECLARE_IMPORT(10, remove)
112#define I_mkdir DECLARE_IMPORT(11, mkdir)
113#define I_rmdir DECLARE_IMPORT(12, rmdir)
114#define I_dopen DECLARE_IMPORT(13, dopen)
115#define I_dclose DECLARE_IMPORT(14, dclose)
116#define I_dread DECLARE_IMPORT(15, dread)
117#define I_getstat DECLARE_IMPORT(16, getstat)
118#define I_chstat DECLARE_IMPORT(17, chstat)
119#define I_format DECLARE_IMPORT(18, format)
120#define I_AddDrv DECLARE_IMPORT(20, AddDrv);
121#define I_DelDrv DECLARE_IMPORT(21, DelDrv);
struct _iop_device * device
struct _iop_file iop_file_t