sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
ioman.c File Reference
#include "types.h"
#include "ioman_mod.h"
#include <string.h>
#include "stdarg.h"
#include "intrman.h"
#include "errno.h"
#include <ioman.h>

Go to the source code of this file.

Macros

#define index   strchr
#define MODNAME   "ioman"
#define MAX_DEVICES   16
#define MAX_FILES   16
#define isnum(c)

Functions

 IOMAN_RETURN_VALUE_IMPL (0)
int _start (int argc, char *argv[])
int io_AddDrv (iop_io_device_t *device)
int io_DelDrv (const char *name)
iop_io_file_t * get_file (int fd)
iop_io_file_t * get_new_file (void)
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 offset, int whence)
int io_ioctl (int fd, unsigned long arg, void *param)
int io_remove (const char *name)
int io_mkdir (const char *name)
int io_rmdir (const char *name)
int io_dopen (const char *name, int mode)
int io_dclose (int fd)
int io_dread (int fd, io_dirent_t *io_dirent)
int io_getstat (const char *name, io_stat_t *stat)
int io_chstat (const char *name, io_stat_t *stat, unsigned int mask)
int io_format (const char *dev)

Variables

iop_io_file_t file_table [MAX_FILES]
iop_io_device_ops_t tty_dev_operations
iop_io_device_t tty_device

Detailed Description

Standard file manager library.

Definition in file ioman.c.

Macro Definition Documentation

◆ index

#define index   strchr

Definition at line 27 of file ioman.c.

◆ isnum

#define isnum ( c)
Value:
((c) >= '0' && (c) <= '9')

Definition at line 49 of file ioman.c.

◆ MAX_DEVICES

#define MAX_DEVICES   16

Definition at line 41 of file ioman.c.

◆ MAX_FILES

#define MAX_FILES   16

Definition at line 42 of file ioman.c.

◆ MODNAME

#define MODNAME   "ioman"

Definition at line 32 of file ioman.c.

Function Documentation

◆ _start()

int _start ( int argc,
char * argv[] )

Definition at line 134 of file ioman.c.

◆ get_file()

iop_io_file_t * get_file ( int fd)

Definition at line 270 of file ioman.c.

◆ get_new_file()

iop_io_file_t * get_new_file ( void )

Definition at line 281 of file ioman.c.

◆ io_AddDrv()

int io_AddDrv ( iop_io_device_t * device)

Definition at line 154 of file ioman.c.

◆ io_chstat()

int io_chstat ( const char * name,
io_stat_t * stat,
unsigned int mask )

Definition at line 569 of file ioman.c.

◆ io_close()

int io_close ( int fd)

Definition at line 343 of file ioman.c.

◆ io_dclose()

int io_dclose ( int fd)

Definition at line 512 of file ioman.c.

◆ io_DelDrv()

int io_DelDrv ( const char * name)

Definition at line 186 of file ioman.c.

◆ io_dopen()

int io_dopen ( const char * name,
int mode )

Definition at line 483 of file ioman.c.

◆ io_dread()

int io_dread ( int fd,
io_dirent_t * io_dirent )

Definition at line 529 of file ioman.c.

◆ io_format()

int io_format ( const char * dev)

Definition at line 594 of file ioman.c.

◆ io_getstat()

int io_getstat ( const char * name,
io_stat_t * stat )

Definition at line 544 of file ioman.c.

◆ io_ioctl()

int io_ioctl ( int fd,
unsigned long arg,
void * param )

Definition at line 399 of file ioman.c.

◆ io_lseek()

int io_lseek ( int fd,
int offset,
int whence )

Definition at line 380 of file ioman.c.

◆ io_mkdir()

int io_mkdir ( const char * name)

Definition at line 473 of file ioman.c.

◆ io_open()

int io_open ( const char * name,
int mode )

Definition at line 312 of file ioman.c.

◆ io_read()

int io_read ( int fd,
void * ptr,
size_t size )

Definition at line 360 of file ioman.c.

◆ io_remove()

int io_remove ( const char * name)

Definition at line 409 of file ioman.c.

◆ io_rmdir()

int io_rmdir ( const char * name)

Definition at line 478 of file ioman.c.

◆ io_write()

int io_write ( int fd,
void * ptr,
size_t size )

Definition at line 370 of file ioman.c.

Variable Documentation

◆ file_table

iop_io_file_t file_table[MAX_FILES]

Definition at line 45 of file ioman.c.

◆ tty_dev_operations

iop_io_device_ops_t tty_dev_operations
Initial value:
= {
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
IOMAN_RETURN_VALUE(0),
}

Definition at line 57 of file ioman.c.

◆ tty_device

iop_io_device_t tty_device
Initial value:
= {
"tty",
IOP_DT_CHAR,
1,
"CONSOLE",
&tty_dev_operations,
}

Definition at line 77 of file ioman.c.