PS2SDK
PS2 Homebrew Libraries
ioman_mod.h File Reference
#include <types.h>
#include <irx.h>
#include <io_common.h>
#include <iox_stat.h>
+ Include dependency graph for ioman_mod.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _iop_io_file
 
struct  _iop_io_device
 
struct  _iop_io_device_ops
 

Macros

#define IOP_DT_CHAR   0x01
 
#define IOP_DT_CONS   0x02
 
#define IOP_DT_BLOCK   0x04
 
#define IOP_DT_RAW   0x08
 
#define IOP_DT_FS   0x10
 
#define IOMAN_RETURN_VALUE_IMPL(val)
 
#define IOMAN_RETURN_VALUE(val)   ((void*)&my_ioman_retval_##val##_int)
 
#define IOMAN_RETURN_VALUE_S64(val)   ((void*)&my_ioman_retval_##val##_s64)
 
#define ioman_mod_IMPORTS_start   DECLARE_IMPORT_TABLE(ioman, 1, 1)
 
#define ioman_mod_IMPORTS_end   END_IMPORT_TABLE
 
#define I_io_open   DECLARE_IMPORT(4, io_open)
 
#define I_io_close   DECLARE_IMPORT(5, io_close)
 
#define I_io_read   DECLARE_IMPORT(6, io_read)
 
#define I_io_write   DECLARE_IMPORT(7, io_write)
 
#define I_io_lseek   DECLARE_IMPORT(8, io_lseek)
 
#define I_io_ioctl   DECLARE_IMPORT(9, io_ioctl)
 
#define I_io_remove   DECLARE_IMPORT(10, io_remove)
 
#define I_io_mkdir   DECLARE_IMPORT(11, io_mkdir)
 
#define I_io_rmdir   DECLARE_IMPORT(12, io_rmdir)
 
#define I_io_dopen   DECLARE_IMPORT(13, io_dopen)
 
#define I_io_dclose   DECLARE_IMPORT(14, io_dclose)
 
#define I_io_dread   DECLARE_IMPORT(15, io_dread)
 
#define I_io_getstat   DECLARE_IMPORT(16, io_getstat)
 
#define I_io_chstat   DECLARE_IMPORT(17, io_chstat)
 
#define I_io_format   DECLARE_IMPORT(18, io_format)
 
#define I_io_AddDrv   DECLARE_IMPORT(20, io_AddDrv);
 
#define I_io_DelDrv   DECLARE_IMPORT(21, io_DelDrv);
 

Typedefs

typedef struct _iop_io_file iop_io_file_t
 
typedef struct _iop_io_device iop_io_device_t
 
typedef struct _iop_io_device_ops iop_io_device_ops_t
 

Functions

int io_open (const char *name, int mode)
 
int io_close (int fd)
 
int io_read (int fd, void *ptr, size_t size)
 
int io_write (int fd, void *ptr, size_t size)
 
int io_lseek (int fd, int pos, int mode)
 
int io_ioctl (int fd, unsigned long arg, void *param)
 
int io_remove (const char *name)
 
int io_mkdir (const char *path)
 
int io_rmdir (const char *path)
 
int io_dopen (const char *path, int mode)
 
int io_dclose (int fd)
 
int io_dread (int fd, io_dirent_t *buf)
 
int io_getstat (const char *name, io_stat_t *stat)
 
int io_chstat (const char *name, io_stat_t *stat, unsigned int statmask)
 
int io_format (const char *dev)
 
int io_AddDrv (iop_io_device_t *device)
 
int io_DelDrv (const char *name)
 

Detailed Description

IOMAN definitions and imports.

Definition in file ioman_mod.h.


Data Structure Documentation

◆ _iop_io_file

struct _iop_io_file

File objects passed to driver operations.

Definition at line 55 of file ioman_mod.h.

+ Collaboration diagram for _iop_io_file:
Data Fields
int mode

File open mode.

int unit

HW device unit number.

struct _iop_io_device * device

Device driver.

void * privdata

The device driver can use this however it wants.

◆ _iop_io_device

struct _iop_io_device

Definition at line 66 of file ioman_mod.h.

+ Collaboration diagram for _iop_io_device:
Data Fields
const char * name
unsigned int type
unsigned int version

Not so sure about this one.

const char * desc
struct _iop_io_device_ops * ops

Macro Definition Documentation

◆ IOMAN_RETURN_VALUE_IMPL

#define IOMAN_RETURN_VALUE_IMPL (   val)
Value:
static inline int my_ioman_retval_##val##_int(void) {return -val;} \
static inline signed long long my_ioman_retval_##val##_s64(void) {return -val;}

Definition at line 75 of file ioman_mod.h.

Typedef Documentation

◆ iop_io_file_t

typedef struct _iop_io_file iop_io_file_t

File objects passed to driver operations.