PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
fileXio_iop.c File Reference
#include <types.h>
#include <stdio.h>
#include <sysclib.h>
#include <thbase.h>
#include <intrman.h>
#include <iomanX.h>
#include <loadcore.h>
#include <sysmem.h>
#include <sifman.h>
#include <sifcmd.h>
#include <errno.h>
#include <fileXio.h>
+ Include dependency graph for fileXio_iop.c:

Go to the source code of this file.

Macros

#define MODNAME   "fileXio"
 
#define M_PRINTF(format, args...)
 
#define M_DEBUG(format, args...)
 
#define TRUE   1
 
#define FALSE   0
 
#define MIN(a, b)
 
#define RDOWN_64(a)
 
#define DEFAULT_RWSIZE   16384
 

Functions

 IRX_ID ("IOX/File_Manager_Rpc", 1, 2)
 
static unsigned char fileXio_rpc_buffer[0x4C00] __attribute__ ((__aligned__(4)))
 
static int fileXio_GetDeviceList_RPC (struct fileXioDevice *ee_devices, int eecount)
 
static int fileXio_CopyFile_RPC (const char *src, const char *dest, int mode)
 
static int fileXio_Read_RPC (int infd, char *read_buf, int read_size, void *intr_data)
 
static int fileXio_Write_RPC (int outfd, const char *write_buf, int write_size, int mis, u8 *misbuf)
 
static int fileXio_GetDir_RPC (const char *pathname, struct fileXioDirEntry dirEntry[], unsigned int req_entries)
 
static int fileXio_Mount_RPC (const char *mountstring, const char *mountpoint, int flag)
 
static int fileXio_chstat_RPC (char *filename, void *eeptr, int mask)
 
static int fileXio_getstat_RPC (char *filename, void *eeptr)
 
static int fileXio_dread_RPC (int fd, void *eeptr)
 
static void * fileXioRpc_Stop ()
 
static void * fileXioRpc_GetDeviceList (unsigned int *sbuff)
 
static void * fileXioRpc_Getdir (unsigned int *sbuff)
 
static void * fileXioRpc_Mount (unsigned int *sbuff)
 
static void * fileXioRpc_uMount (unsigned int *sbuff)
 
static void * fileXioRpc_CopyFile (unsigned int *sbuff)
 
static void * fileXioRpc_MkDir (unsigned int *sbuff)
 
static void * fileXioRpc_RmDir (unsigned int *sbuff)
 
static void * fileXioRpc_Remove (unsigned int *sbuff)
 
static void * fileXioRpc_Rename (unsigned int *sbuff)
 
static void * fileXioRpc_SymLink (unsigned int *sbuff)
 
static void * fileXioRpc_ReadLink (unsigned int *sbuff)
 
static void * fileXioRpc_ChDir (unsigned int *sbuff)
 
static void * fileXioRpc_Open (unsigned int *sbuff)
 
static void * fileXioRpc_Close (unsigned int *sbuff)
 
static void * fileXioRpc_Read (unsigned int *sbuff)
 
static void * fileXioRpc_Write (unsigned int *sbuff)
 
static void * fileXioRpc_Lseek (unsigned int *sbuff)
 
static void * fileXioRpc_Lseek64 (unsigned int *sbuff)
 
static void * fileXioRpc_ChStat (unsigned int *sbuff)
 
static void * fileXioRpc_GetStat (unsigned int *sbuff)
 
static void * fileXioRpc_Format (unsigned int *sbuff)
 
static void * fileXioRpc_AddDrv (unsigned int *sbuff)
 
static void * fileXioRpc_DelDrv (unsigned int *sbuff)
 
static void * fileXioRpc_Sync (unsigned int *sbuff)
 
static void * fileXioRpc_Devctl (unsigned int *sbuff)
 
static void * fileXioRpc_Ioctl (unsigned int *sbuff)
 
static void * fileXioRpc_Ioctl2 (unsigned int *sbuff)
 
static void * fileXioRpc_Dopen (unsigned int *sbuff)
 
static void * fileXioRpc_Dread (unsigned int *sbuff)
 
static void * fileXioRpc_Dclose (unsigned int *sbuff)
 
static void * filexioRpc_SetRWBufferSize (void *sbuff)
 
static void DirEntryCopy (struct fileXioDirEntry *dirEntry, iox_dirent_t *internalDirEntry)
 
static void * fileXio_rpc_server (int fno, void *data, int size)
 
static void fileXio_Thread (void *param)
 
int _start (int argc, char *argv[])
 

Variables

static void * rwbuf = NULL
 
static unsigned int RWBufferSize =DEFAULT_RWSIZE
 
struct t_SifRpcDataQueue qd
 
struct t_SifRpcServerData sd0
 
static rests_pkt rests
 

Detailed Description

fileXio RPC Server This module provides an RPC interface to the EE for all the functions of ioman/fileio.

Definition in file fileXio_iop.c.

Macro Definition Documentation

◆ MODNAME

#define MODNAME   "fileXio"

Definition at line 33 of file fileXio_iop.c.

◆ M_PRINTF

#define M_PRINTF ( format,
args... )
Value:
printf(MODNAME ": " format, ##args)

Definition at line 36 of file fileXio_iop.c.

◆ M_DEBUG

#define M_DEBUG ( format,
args... )

Definition at line 42 of file fileXio_iop.c.

◆ TRUE

#define TRUE   1

Definition at line 45 of file fileXio_iop.c.

◆ FALSE

#define FALSE   0

Definition at line 46 of file fileXio_iop.c.

◆ MIN

#define MIN ( a,
b )
Value:
(((a)<(b))?(a):(b))

Definition at line 48 of file fileXio_iop.c.

◆ RDOWN_64

#define RDOWN_64 ( a)
Value:
((unsigned int)(a)&~0x3F)

Definition at line 49 of file fileXio_iop.c.

◆ DEFAULT_RWSIZE

#define DEFAULT_RWSIZE   16384

Definition at line 51 of file fileXio_iop.c.

Function Documentation

◆ fileXio_GetDeviceList_RPC()

static int fileXio_GetDeviceList_RPC ( struct fileXioDevice * ee_devices,
int eecount )
static

Definition at line 140 of file fileXio_iop.c.

◆ fileXio_CopyFile_RPC()

static int fileXio_CopyFile_RPC ( const char * src,
const char * dest,
int mode )
static

Definition at line 174 of file fileXio_iop.c.

◆ fileXio_Read_RPC()

static int fileXio_Read_RPC ( int infd,
char * read_buf,
int read_size,
void * intr_data )
static

Definition at line 207 of file fileXio_iop.c.

◆ fileXio_Write_RPC()

static int fileXio_Write_RPC ( int outfd,
const char * write_buf,
int write_size,
int mis,
u8 * misbuf )
static

Definition at line 305 of file fileXio_iop.c.

◆ fileXio_GetDir_RPC()

static int fileXio_GetDir_RPC ( const char * pathname,
struct fileXioDirEntry dirEntry[],
unsigned int req_entries )
static

Definition at line 349 of file fileXio_iop.c.

◆ fileXio_Mount_RPC()

static int fileXio_Mount_RPC ( const char * mountstring,
const char * mountpoint,
int flag )
static

Definition at line 413 of file fileXio_iop.c.

◆ fileXio_chstat_RPC()

static int fileXio_chstat_RPC ( char * filename,
void * eeptr,
int mask )
static

Definition at line 421 of file fileXio_iop.c.

◆ fileXio_getstat_RPC()

static int fileXio_getstat_RPC ( char * filename,
void * eeptr )
static

Definition at line 433 of file fileXio_iop.c.

◆ fileXio_dread_RPC()

static int fileXio_dread_RPC ( int fd,
void * eeptr )
static

Definition at line 459 of file fileXio_iop.c.

◆ fileXioRpc_Stop()

static void * fileXioRpc_Stop ( void )
static

Definition at line 484 of file fileXio_iop.c.

◆ fileXioRpc_GetDeviceList()

static void * fileXioRpc_GetDeviceList ( unsigned int * sbuff)
static

Definition at line 493 of file fileXio_iop.c.

◆ fileXioRpc_Getdir()

static void * fileXioRpc_Getdir ( unsigned int * sbuff)
static

Definition at line 510 of file fileXio_iop.c.

◆ fileXioRpc_Mount()

static void * fileXioRpc_Mount ( unsigned int * sbuff)
static

Definition at line 527 of file fileXio_iop.c.

◆ fileXioRpc_uMount()

static void * fileXioRpc_uMount ( unsigned int * sbuff)
static

Definition at line 546 of file fileXio_iop.c.

◆ fileXioRpc_CopyFile()

static void * fileXioRpc_CopyFile ( unsigned int * sbuff)
static

Definition at line 560 of file fileXio_iop.c.

◆ fileXioRpc_MkDir()

static void * fileXioRpc_MkDir ( unsigned int * sbuff)
static

Definition at line 578 of file fileXio_iop.c.

◆ fileXioRpc_RmDir()

static void * fileXioRpc_RmDir ( unsigned int * sbuff)
static

Definition at line 591 of file fileXio_iop.c.

◆ fileXioRpc_Remove()

static void * fileXioRpc_Remove ( unsigned int * sbuff)
static

Definition at line 604 of file fileXio_iop.c.

◆ fileXioRpc_Rename()

static void * fileXioRpc_Rename ( unsigned int * sbuff)
static

Definition at line 618 of file fileXio_iop.c.

◆ fileXioRpc_SymLink()

static void * fileXioRpc_SymLink ( unsigned int * sbuff)
static

Definition at line 632 of file fileXio_iop.c.

◆ fileXioRpc_ReadLink()

static void * fileXioRpc_ReadLink ( unsigned int * sbuff)
static

Definition at line 647 of file fileXio_iop.c.

◆ fileXioRpc_ChDir()

void * fileXioRpc_ChDir ( unsigned int * sbuff)
static

Definition at line 660 of file fileXio_iop.c.

◆ fileXioRpc_Open()

static void * fileXioRpc_Open ( unsigned int * sbuff)
static

Definition at line 673 of file fileXio_iop.c.

◆ fileXioRpc_Close()

static void * fileXioRpc_Close ( unsigned int * sbuff)
static

Definition at line 686 of file fileXio_iop.c.

◆ fileXioRpc_Read()

static void * fileXioRpc_Read ( unsigned int * sbuff)
static

Definition at line 701 of file fileXio_iop.c.

◆ fileXioRpc_Write()

static void * fileXioRpc_Write ( unsigned int * sbuff)
static

Definition at line 717 of file fileXio_iop.c.

◆ fileXioRpc_Lseek()

static void * fileXioRpc_Lseek ( unsigned int * sbuff)
static

Definition at line 733 of file fileXio_iop.c.

◆ fileXioRpc_Lseek64()

static void * fileXioRpc_Lseek64 ( unsigned int * sbuff)
static

Definition at line 748 of file fileXio_iop.c.

◆ fileXioRpc_ChStat()

static void * fileXioRpc_ChStat ( unsigned int * sbuff)
static

Definition at line 772 of file fileXio_iop.c.

◆ fileXioRpc_GetStat()

static void * fileXioRpc_GetStat ( unsigned int * sbuff)
static

Definition at line 786 of file fileXio_iop.c.

◆ fileXioRpc_Format()

static void * fileXioRpc_Format ( unsigned int * sbuff)
static

Definition at line 802 of file fileXio_iop.c.

◆ fileXioRpc_AddDrv()

static void * fileXioRpc_AddDrv ( unsigned int * sbuff)
static

Definition at line 814 of file fileXio_iop.c.

◆ fileXioRpc_DelDrv()

static void * fileXioRpc_DelDrv ( unsigned int * sbuff)
static

Definition at line 825 of file fileXio_iop.c.

◆ fileXioRpc_Sync()

static void * fileXioRpc_Sync ( unsigned int * sbuff)
static

Definition at line 837 of file fileXio_iop.c.

◆ fileXioRpc_Devctl()

static void * fileXioRpc_Devctl ( unsigned int * sbuff)
static

Definition at line 850 of file fileXio_iop.c.

◆ fileXioRpc_Ioctl()

static void * fileXioRpc_Ioctl ( unsigned int * sbuff)
static

Definition at line 888 of file fileXio_iop.c.

◆ fileXioRpc_Ioctl2()

static void * fileXioRpc_Ioctl2 ( unsigned int * sbuff)
static

Definition at line 902 of file fileXio_iop.c.

◆ fileXioRpc_Dopen()

static void * fileXioRpc_Dopen ( unsigned int * sbuff)
static

Definition at line 939 of file fileXio_iop.c.

◆ fileXioRpc_Dread()

static void * fileXioRpc_Dread ( unsigned int * sbuff)
static

Definition at line 950 of file fileXio_iop.c.

◆ fileXioRpc_Dclose()

static void * fileXioRpc_Dclose ( unsigned int * sbuff)
static

Definition at line 961 of file fileXio_iop.c.

◆ filexioRpc_SetRWBufferSize()

static void * filexioRpc_SetRWBufferSize ( void * sbuff)
static

Definition at line 1004 of file fileXio_iop.c.

◆ DirEntryCopy()

static void DirEntryCopy ( struct fileXioDirEntry * dirEntry,
iox_dirent_t * internalDirEntry )
static

Definition at line 1098 of file fileXio_iop.c.

◆ fileXio_rpc_server()

static void * fileXio_rpc_server ( int fno,
void * data,
int size )
static

Definition at line 1023 of file fileXio_iop.c.

◆ fileXio_Thread()

static void fileXio_Thread ( void * param)
static

Definition at line 977 of file fileXio_iop.c.

◆ _start()

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

Definition at line 114 of file fileXio_iop.c.

Variable Documentation

◆ rwbuf

void* rwbuf = NULL
static

Definition at line 52 of file fileXio_iop.c.

◆ RWBufferSize

unsigned int RWBufferSize =DEFAULT_RWSIZE
static

Definition at line 53 of file fileXio_iop.c.

◆ qd

struct t_SifRpcDataQueue qd

Definition at line 58 of file fileXio_iop.c.

◆ sd0

struct t_SifRpcServerData sd0

Definition at line 59 of file fileXio_iop.c.

◆ rests

rests_pkt rests
static

Definition at line 61 of file fileXio_iop.c.