PS2SDK
PS2 Homebrew Libraries
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>
+ Include dependency graph for ioman.c:

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)   ((c) >= '0' && (c) <= '9')
 

Functions

 IOMAN_RETURN_VALUE_IMPL (0)
 
static int add_tty_device (void)
 
static int open_tty_handles (void)
 
static int setup_tty_device (int should_not_add_tty_device)
 
static int print_abort_error_io (const char *str1, const char *str2)
 
int _start (int argc, char *argv[])
 
int io_AddDrv (iop_io_device_t *device)
 
int io_DelDrv (const char *name)
 
static void print_known_devices (void)
 
static char * find_iop_device (const char *dev, int *unit, iop_io_device_t **device)
 
iop_io_file_tget_file (int fd)
 
iop_io_file_tget_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)
 
static int path_common (const char *name, int arg, int code)
 
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

static iop_io_device_tdev_list [MAX_DEVICES]
 
iop_io_file_t file_table [MAX_FILES]
 
static int should_print_known_devices = 1
 
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.

Variable Documentation

◆ 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.