ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
Go to the source code of this file.
Macros | |
#define | FXIO_WAIT 0 |
#define | FXIO_NOWAIT 1 |
#define | FXIO_COMPLETE 1 |
#define | FXIO_INCOMPLETE 0 |
Functions | |
int | fileXioInit (void) |
void | fileXioExit (void) |
void | fileXioSetBlockMode (int blocking) |
int | fileXioWaitAsync (int mode, int *retVal) |
void | fileXioStop () |
int | fileXioGetDeviceList (struct fileXioDevice deviceEntry[], unsigned int req_entries) |
int | fileXioGetdir (const char *pathname, struct fileXioDirEntry DirEntry[], unsigned int req_entries) |
int | fileXioMount (const char *mountpoint, const char *blockdev, int flag) |
int | fileXioUmount (const char *mountpoint) |
int | fileXioCopyfile (const char *source, const char *dest, int mode) |
int | fileXioMkdir (const char *pathname, int mode) |
int | fileXioRmdir (const char *pathname) |
int | fileXioRemove (const char *pathname) |
int | fileXioRename (const char *source, const char *dest) |
int | fileXioSymlink (const char *source, const char *dest) |
int | fileXioReadlink (const char *source, char *buf, int buflen) |
int | fileXioChdir (const char *pathname) |
int | fileXioOpen (const char *source, int flags,...) |
int | fileXioClose (int fd) |
int | fileXioRead (int fd, void *buf, int size) |
int | fileXioWrite (int fd, const void *buf, int size) |
int | fileXioLseek (int fd, int offset, int whence) |
s64 | fileXioLseek64 (int fd, s64 offset, int whence) |
int | fileXioChStat (const char *name, iox_stat_t *stat, int mask) |
int | fileXioGetStat (const char *name, iox_stat_t *stat) |
int | fileXioFormat (const char *dev, const char *blockdev, const void *args, int arglen) |
int | fileXioSync (const char *devname, int flag) |
int | fileXioDopen (const char *name) |
int | fileXioDclose (int fd) |
int | fileXioDread (int fd, iox_dirent_t *dirent) |
int | fileXioDevctl (const char *name, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen) |
int | fileXioIoctl (int fd, int cmd, void *arg) |
int | fileXioIoctl2 (int fd, int command, void *arg, unsigned int arglen, void *buf, unsigned int buflen) |
int | fileXioSetRWBufferSize (int size) |
fileXio RPC client header file
Definition in file fileXio_rpc.h.
#define FXIO_COMPLETE 1 |
Definition at line 30 of file fileXio_rpc.h.
#define FXIO_INCOMPLETE 0 |
Definition at line 31 of file fileXio_rpc.h.
#define FXIO_NOWAIT 1 |
Definition at line 28 of file fileXio_rpc.h.
#define FXIO_WAIT 0 |
Definition at line 27 of file fileXio_rpc.h.
int fileXioChdir | ( | const char * | pathname | ) |
Definition at line 556 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_CHDIR, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, fxio_pathsel_packet::pathname, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
int fileXioChStat | ( | const char * | name, |
iox_stat_t * | stat, | ||
int | mask | ||
) |
Definition at line 784 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_CHSTAT, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, IS_UNCACHED_SEG, fxio_chstat_packet::mask, NULL, packet, sbuff, SifCallRpc(), SifWriteBackDCache(), SignalSema(), fxio_chstat_packet::stat, and WaitSema().
int fileXioClose | ( | int | fd | ) |
Definition at line 612 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, fxio_close_packet::fd, FILEXIO_CLOSE, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by fileXioInit(), hddExpandFilesystem(), hddGetFilesystemList(), and hddMakeFilesystem().
int fileXioCopyfile | ( | const char * | source, |
const char * | dest, | ||
int | mode | ||
) |
Definition at line 371 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, fxio_copyfile_packet::dest, ENOPKG, FILEXIO_COPYFILE, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, mode, NULL, packet, sbuff, SifCallRpc(), SignalSema(), fxio_copyfile_packet::source, and WaitSema().
int fileXioDclose | ( | int | fd | ) |
Definition at line 924 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, fxio_close_packet::fd, FILEXIO_DCLOSE, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by fileXioClosedirHelper(), hddGetFilesystemList(), and hddUpdateInfo().
int fileXioDevctl | ( | const char * | name, |
int | cmd, | ||
void * | arg, | ||
unsigned int | arglen, | ||
void * | buf, | ||
unsigned int | buflen | ||
) |
Definition at line 986 of file fileXio_rpc.c.
References _fxio_intr(), _intr_data, _lock(), _unlock(), fxio_devctl_packet::arg, fxio_devctl_packet::arglen, fxio_devctl_packet::buf, fxio_devctl_packet::buflen, cd0, fxio_devctl_packet::cmd, CTL_BUF_SIZE, ENOPKG, FILEXIO_DEVCTL, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), fxio_ctl_intr(), FXIO_NOWAIT, fxio_devctl_packet::name, NULL, packet, sbuff, SifCallRpc(), SifWriteBackDCache(), SignalSema(), and WaitSema().
Referenced by hddCheckFormatted(), hddCheckPresent(), hddGetFilesystemList(), and hddUpdateInfo().
int fileXioDopen | ( | const char * | name | ) |
Definition at line 900 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_DOPEN, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by fileXioOpendirHelper(), hddGetFilesystemList(), and hddUpdateInfo().
int fileXioDread | ( | int | fd, |
iox_dirent_t * | dirent | ||
) |
Definition at line 948 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, fxio_dread_packet::dirent, ENOPKG, fxio_dread_packet::fd, FILEXIO_DREAD, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, IS_UNCACHED_SEG, NULL, packet, sbuff, SifCallRpc(), SifWriteBackDCache(), SignalSema(), and WaitSema().
Referenced by fileXioReaddirHelper(), hddGetFilesystemList(), and hddUpdateInfo().
void fileXioExit | ( | void | ) |
Definition at line 237 of file fileXio_rpc.c.
References _lock_sema_id, cd0, DeleteSema(), fileXioCompletionSema, and fileXioInited.
Referenced by fileXioInit().
int fileXioFormat | ( | const char * | dev, |
const char * | blockdev, | ||
const void * | args, | ||
int | arglen | ||
) |
Definition at line 843 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), fxio_format_packet::arglen, fxio_format_packet::args, cd0, ENOPKG, FILEXIO_FORMAT, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by hddFormat(), and hddMakeFilesystem().
int fileXioGetDeviceList | ( | struct fileXioDevice | deviceEntry[], |
unsigned int | req_entries | ||
) |
Definition at line 260 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, fxio_devlist_packet::deviceEntry, ENOPKG, FILEXIO_GETDEVICELIST, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
int fileXioGetdir | ( | const char * | pathname, |
struct fileXioDirEntry | DirEntry[], | ||
unsigned int | req_entries | ||
) |
Definition at line 287 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, fxio_getdir_packet::dirEntry, ENOPKG, FILEXIO_GETDIR, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, fxio_getdir_packet::pathname, sbuff, SifCallRpc(), SifWriteBackDCache(), SignalSema(), and WaitSema().
int fileXioGetStat | ( | const char * | name, |
iox_stat_t * | stat | ||
) |
Definition at line 814 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_GETSTAT, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, IS_UNCACHED_SEG, NULL, packet, sbuff, SifCallRpc(), SifWriteBackDCache(), SignalSema(), fxio_getstat_packet::stat, and WaitSema().
Referenced by fileXioGetstatHelper().
int fileXioInit | ( | void | ) |
Definition at line 176 of file fileXio_rpc.c.
References _iop_reboot_count, _lock_sema_id, _ps2sdk_close, _ps2sdk_closedir, _ps2sdk_ioctl, _ps2sdk_lseek, _ps2sdk_lseek64, _ps2sdk_mkdir, _ps2sdk_open, _ps2sdk_opendir, _ps2sdk_read, _ps2sdk_readdir, _ps2sdk_remove, _ps2sdk_rename, _ps2sdk_rewinddir, _ps2sdk_rmdir, _ps2sdk_stat, _ps2sdk_write, cd0, CreateSema(), FILEXIO_IRX, fileXioBlockMode, fileXioClose(), fileXioClosedirHelper(), fileXioCompletionSema, fileXioExit(), fileXioGetstatHelper(), fileXioInited, fileXioIoctl(), fileXioLseek(), fileXioLseek64(), fileXioMkdir(), fileXioOpen(), fileXioOpendirHelper(), fileXioRead(), fileXioReaddirHelper(), fileXioRemove(), fileXioRename(), fileXioRewinddirHelper(), fileXioRmdir(), fileXioWrite(), FXIO_WAIT, nopdelay(), NULL, SifRpcClientData_t::server, SifBindRpc(), and sp.
Referenced by fileXioChdir(), fileXioChStat(), fileXioClose(), fileXioCopyfile(), fileXioDclose(), fileXioDevctl(), fileXioDopen(), fileXioDread(), fileXioFormat(), fileXioGetDeviceList(), fileXioGetdir(), fileXioGetStat(), fileXioIoctl(), fileXioIoctl2(), fileXioLseek(), fileXioLseek64(), fileXioMkdir(), fileXioMount(), fileXioOpen(), fileXioRead(), fileXioReadlink(), fileXioRemove(), fileXioRename(), fileXioRmdir(), fileXioSetRWBufferSize(), fileXioStop(), fileXioSymlink(), fileXioSync(), fileXioUmount(), fileXioWaitAsync(), and fileXioWrite().
int fileXioIoctl | ( | int | fd, |
int | cmd, | ||
void * | arg | ||
) |
Definition at line 1028 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), fxio_ioctl_packet::arg, cd0, fxio_ioctl_packet::cmd, ENOPKG, fxio_ioctl_packet::fd, FILEXIO_IOCTL, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, IOCTL_BUF_SIZE, NULL, packet, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by fileXioInit().
int fileXioIoctl2 | ( | int | fd, |
int | command, | ||
void * | arg, | ||
unsigned int | arglen, | ||
void * | buf, | ||
unsigned int | buflen | ||
) |
Definition at line 1055 of file fileXio_rpc.c.
References _fxio_intr(), _intr_data, _lock(), _unlock(), fxio_ioctl2_packet::arg, fxio_ioctl2_packet::arglen, fxio_ioctl2_packet::buf, fxio_ioctl2_packet::buflen, cd0, command, CTL_BUF_SIZE, ENOPKG, fxio_ioctl2_packet::fd, FILEXIO_IOCTL2, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), fxio_ctl_intr(), FXIO_NOWAIT, NULL, packet, sbuff, SifCallRpc(), SifWriteBackDCache(), SignalSema(), and WaitSema().
Referenced by hddExpandFilesystem(), hddGetFilesystemList(), and hddMakeFilesystem().
int fileXioLseek | ( | int | fd, |
int | offset, | ||
int | whence | ||
) |
Definition at line 720 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, fxio_lseek_packet::fd, FILEXIO_LSEEK, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, fxio_lseek_packet::offset, packet, sbuff, SifCallRpc(), SignalSema(), WaitSema(), and fxio_lseek_packet::whence.
Referenced by fileXioInit().
Definition at line 750 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_LSEEK64, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, fxio_lseek64_return_pkt::pos_hi, fxio_lseek64_return_pkt::pos_lo, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by fileXioInit().
int fileXioMkdir | ( | const char * | pathname, |
int | mode | ||
) |
Definition at line 398 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_MKDIR, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, mode, NULL, packet, fxio_mkdir_packet::pathname, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by fileXioInit().
int fileXioMount | ( | const char * | mountpoint, |
const char * | blockdev, | ||
int | flag | ||
) |
Definition at line 319 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_MOUNT, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, fxio_mount_packet::mountpoint, NULL, packet, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by hddGetFilesystemList().
int fileXioOpen | ( | const char * | source, |
int | flags, | ||
... | |||
) |
Definition at line 581 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_OPEN, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), fxio_open_packet::flags, FXIO_NOWAIT, mode, NULL, packet, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by fileXioInit(), hddExpandFilesystem(), hddGetFilesystemList(), and hddMakeFilesystem().
int fileXioRead | ( | int | fd, |
void * | buf, | ||
int | size | ||
) |
Definition at line 647 of file fileXio_rpc.c.
References _intr_data, _lock(), _unlock(), cd0, ENOPKG, fxio_read_packet::fd, FILEXIO_READ, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, IS_UNCACHED_SEG, packet, recv_intr(), sbuff, SifCallRpc(), SifWriteBackDCache(), SignalSema(), fxio_read_packet::size, and WaitSema().
Referenced by fileXioInit().
int fileXioReadlink | ( | const char * | source, |
char * | buf, | ||
int | buflen | ||
) |
Definition at line 526 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), fxio_readlink_packet::buflen, cd0, ENOPKG, FILEXIO_READLINK, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, IS_UNCACHED_SEG, NULL, packet, sbuff, SifCallRpc(), SifWriteBackDCache(), SignalSema(), fxio_readlink_packet::source, and WaitSema().
int fileXioRemove | ( | const char * | pathname | ) |
Definition at line 449 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_REMOVE, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, fxio_pathsel_packet::pathname, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by fileXioInit(), and hddRemoveFilesystem().
int fileXioRename | ( | const char * | source, |
const char * | dest | ||
) |
Definition at line 474 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, fxio_rename_packet::dest, ENOPKG, FILEXIO_RENAME, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, sbuff, SifCallRpc(), SignalSema(), fxio_rename_packet::source, and WaitSema().
Referenced by fileXioInit().
int fileXioRmdir | ( | const char * | pathname | ) |
Definition at line 424 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_RMDIR, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, fxio_pathsel_packet::pathname, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by fileXioInit().
void fileXioSetBlockMode | ( | int | blocking | ) |
Definition at line 1132 of file fileXio_rpc.c.
References fileXioBlockMode.
int fileXioSetRWBufferSize | ( | int | size | ) |
Definition at line 1137 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_SETRWBUFFSIZE, fileXioCompletionSema, fileXioInit(), NULL, packet, sbuff, SifCallRpc(), SignalSema(), fxio_rwbuff::size, and WaitSema().
void fileXioStop | ( | ) |
Definition at line 250 of file fileXio_rpc.c.
References cd0, FILEXIO_STOP, fileXioInit(), sbuff, and SifCallRpc().
int fileXioSymlink | ( | const char * | source, |
const char * | dest | ||
) |
Definition at line 500 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, fxio_rename_packet::dest, ENOPKG, FILEXIO_SYMLINK, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, sbuff, SifCallRpc(), SignalSema(), fxio_rename_packet::source, and WaitSema().
int fileXioSync | ( | const char * | devname, |
int | flag | ||
) |
Definition at line 874 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_SYNC, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, NULL, packet, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
int fileXioUmount | ( | const char * | mountpoint | ) |
Definition at line 346 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, FILEXIO_UMOUNT, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, fxio_unmount_packet::mountpoint, NULL, packet, sbuff, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by hddGetFilesystemList().
int fileXioWaitAsync | ( | int | mode, |
int * | retVal | ||
) |
Definition at line 1096 of file fileXio_rpc.c.
References ENOPKG, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_COMPLETE, FXIO_INCOMPLETE, FXIO_NOWAIT, FXIO_WAIT, mode, NULL, PollSema(), sbuff, SignalSema(), UNCACHED_SEG, and WaitSema().
int fileXioWrite | ( | int | fd, |
const void * | buf, | ||
int | size | ||
) |
Definition at line 678 of file fileXio_rpc.c.
References _fxio_intr(), _lock(), _unlock(), cd0, ENOPKG, fxio_write_packet::fd, FILEXIO_WRITE, fileXioBlockMode, fileXioCompletionSema, fileXioInit(), FXIO_NOWAIT, IS_UNCACHED_SEG, NULL, packet, sbuff, SifCallRpc(), SifWriteBackDCache(), SignalSema(), fxio_write_packet::size, and WaitSema().
Referenced by fileXioInit().