14#ifndef PSPIOFILEMGR_KERNEL_H
15#define PSPIOFILEMGR_KERNEL_H
138 int (*
IoDevctl)(
PspIoDrvFileArg *arg,
const char *devname,
unsigned int cmd,
void *indata,
int inlen,
void *outdata,
int outlen);
struct PspIoDrvFuncs PspIoDrvFuncs
Structure to maintain the file driver pointers.
int sceIoGetThreadCwd(SceUID uid, char *dir, int len)
Get the current working directory for a thread.
PspIoDrv SceIoDeviceTable
Compat: Name used on UOFW and March33 for PspIoDrv
Definition pspiofilemgr_kernel.h:157
int sceIoAddDrv(PspIoDrv *drv)
Adds a new IO driver to the system.
PspIoDrvArg SceIoDeviceEntry
Compat: Name used on UOFW and March33 for PspIoDrvArg
Definition pspiofilemgr_kernel.h:161
PspIoDrvFuncs SceIoDeviceFunction
Compat: Name used on UOFW and March33 for PspIoDrvArg
Definition pspiofilemgr_kernel.h:163
struct PspIoDrvFileArg PspIoDrvFileArg
Structure passed to the file functions of the io driver system.
struct PspIoDrvArg PspIoDrvArg
Structure passed to the init and exit functions of the io driver system.
PspIoDrvFileArg SceIoIob
Compat: Name used on UOFW and March33 for PspIoDrvFileArg
Definition pspiofilemgr_kernel.h:159
int sceIoDelDrv(const char *drv_name)
Deletes a IO driver from the system.
int sceIoReopen(const char *file, int flags, SceMode mode, SceUID fd)
Reopens an existing file descriptor.
int sceIoChangeThreadCwd(SceUID uid, char *dir)
Set the current working directory for a thread.
int SceUID
UIDs are used to describe many different kernel objects.
Definition pspkerneltypes.h:24
SceInt64 SceOff
Definition pspkerneltypes.h:35
int SceMode
Definition pspkerneltypes.h:34
int64_t s64
Definition psptypes.h:48
unsigned int SceSize
Definition psptypes.h:103
uint8_t u8
Definition psptypes.h:38
int32_t s32
Definition psptypes.h:47
uint32_t u32
Definition psptypes.h:41
Structure passed to the init and exit functions of the io driver system.
Definition pspiofilemgr_kernel.h:36
void * arg
Pointer to a user defined argument (if written by the driver will preseve across calls.
Definition pspiofilemgr_kernel.h:40
struct PspIoDrv * drv
Pointer to the original driver which was added.
Definition pspiofilemgr_kernel.h:38
SceSize user_fd_count
The number of file descriptor UID related to the device.
Definition pspiofilemgr_kernel.h:42
Structure passed to the file functions of the io driver system.
Definition pspiofilemgr_kernel.h:55
SceUID open_thread_id
The thread UID of the thread that opened the file.
Definition pspiofilemgr_kernel.h:76
u8 unk2
Unknown.
Definition pspiofilemgr_kernel.h:82
SceIoCwd * cwd
Current work directory data.
Definition pspiofilemgr_kernel.h:67
u32 unk3
Definition pspiofilemgr_kernel.h:109
SceUID async_thread_id
The thread UID of the thread for the file async operations.
Definition pspiofilemgr_kernel.h:86
u8 is_power_locked
If the file was opened with power lock flag.
Definition pspiofilemgr_kernel.h:80
s32 async_args[6]
Arguments for the command to use.
Definition pspiofilemgr_kernel.h:101
s64 async_return
The async return value of operations.
Definition pspiofilemgr_kernel.h:99
u32 async_cmd
The async command to execute.
Definition pspiofilemgr_kernel.h:103
u32 fs_num
The file system number, e.g.
Definition pspiofilemgr_kernel.h:59
u32 unk
Definition pspiofilemgr_kernel.h:72
u8 async_priority
The async task priority.
Definition pspiofilemgr_kernel.h:84
u32 flags
The file flags.
Definition pspiofilemgr_kernel.h:57
SceUID async_event_flag
The event flag UID for the file async operations.
Definition pspiofilemgr_kernel.h:90
SceUID async_callback
The callback UID for the file async operations.
Definition pspiofilemgr_kernel.h:92
SceUID uid
UID of the opened file.
Definition pspiofilemgr_kernel.h:74
u32 k1
The current k1 register value for async operations.
Definition pspiofilemgr_kernel.h:97
s64 file_pos
The current file position offset.
Definition pspiofilemgr_kernel.h:69
u32 dev_attr
The device attributes.
Definition pspiofilemgr_kernel.h:63
char * new_path
Definition pspiofilemgr_kernel.h:110
u32 unused
Definition pspiofilemgr_kernel.h:95
SceUID thread_id
he thread UID of owner (?).
Definition pspiofilemgr_kernel.h:71
void * async_callback_argp
A pointer to the parameter to pass to async_callback.
Definition pspiofilemgr_kernel.h:94
void * arg
Pointer to a user defined argument, this is preserved on a per file basis.
Definition pspiofilemgr_kernel.h:65
PspIoDrvArg * drv
A pointer to the driver entry data.
Definition pspiofilemgr_kernel.h:61
u8 is_user_mode
If the file is opened in user mode.
Definition pspiofilemgr_kernel.h:78
SceUID async_sema
The semaphore UID for the file async operations.
Definition pspiofilemgr_kernel.h:88
u32 hook[3]
The IO hook.
Definition pspiofilemgr_kernel.h:108
SceSize return_addr
The return address.
Definition pspiofilemgr_kernel.h:112
u32 user_level
The current user level of the file.
Definition pspiofilemgr_kernel.h:105
Structure to maintain the file driver pointers.
Definition pspiofilemgr_kernel.h:117
int(* IoUmount)(PspIoDrvFileArg *arg)
Definition pspiofilemgr_kernel.h:137
int(* IoChdir)(PspIoDrvFileArg *arg, const char *dir)
Definition pspiofilemgr_kernel.h:135
int(* IoExit)(PspIoDrvArg *arg)
Definition pspiofilemgr_kernel.h:119
int(* IoMkdir)(PspIoDrvFileArg *arg, const char *name, SceMode mode)
Definition pspiofilemgr_kernel.h:127
int(* IoGetstat)(PspIoDrvFileArg *arg, const char *file, SceIoStat *stat)
Definition pspiofilemgr_kernel.h:132
int(* IoWrite)(PspIoDrvFileArg *arg, const char *data, int len)
Definition pspiofilemgr_kernel.h:123
int(* IoDclose)(PspIoDrvFileArg *arg)
Definition pspiofilemgr_kernel.h:130
int(* IoUnk21)(PspIoDrvFileArg *arg)
Definition pspiofilemgr_kernel.h:139
int(* IoInit)(PspIoDrvArg *arg)
Definition pspiofilemgr_kernel.h:118
int(* IoMount)(PspIoDrvFileArg *arg)
Definition pspiofilemgr_kernel.h:136
int(* IoChstat)(PspIoDrvFileArg *arg, const char *file, SceIoStat *stat, int bits)
Definition pspiofilemgr_kernel.h:133
int(* IoIoctl)(PspIoDrvFileArg *arg, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen)
Definition pspiofilemgr_kernel.h:125
int(* IoRemove)(PspIoDrvFileArg *arg, const char *name)
Definition pspiofilemgr_kernel.h:126
int(* IoDevctl)(PspIoDrvFileArg *arg, const char *devname, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen)
Definition pspiofilemgr_kernel.h:138
int(* IoRead)(PspIoDrvFileArg *arg, char *data, int len)
Definition pspiofilemgr_kernel.h:122
int(* IoDread)(PspIoDrvFileArg *arg, SceIoDirent *dir)
Definition pspiofilemgr_kernel.h:131
SceOff(* IoLseek)(PspIoDrvFileArg *arg, SceOff ofs, int whence)
Definition pspiofilemgr_kernel.h:124
int(* IoRmdir)(PspIoDrvFileArg *arg, const char *name)
Definition pspiofilemgr_kernel.h:128
int(* IoClose)(PspIoDrvFileArg *arg)
Definition pspiofilemgr_kernel.h:121
int(* IoOpen)(PspIoDrvFileArg *arg, char *file, int flags, SceMode mode)
Definition pspiofilemgr_kernel.h:120
int(* IoDopen)(PspIoDrvFileArg *arg, const char *dirname)
Definition pspiofilemgr_kernel.h:129
int(* IoRename)(PspIoDrvFileArg *arg, const char *oldname, const char *newname)
Definition pspiofilemgr_kernel.h:134
Definition pspiofilemgr_kernel.h:143
u32 size
Unknown, set to 0x800 almost always (sometimes to 0x001)
Definition pspiofilemgr_kernel.h:149
PspIoDrvFuncs * funcs
Pointer to a filled out functions table.
Definition pspiofilemgr_kernel.h:153
u32 dev_type
Device type, this 0x10 is for a filesystem driver.
Definition pspiofilemgr_kernel.h:147
const char * name2
The device short description.
Definition pspiofilemgr_kernel.h:151
const char * name
The name of the device to add.
Definition pspiofilemgr_kernel.h:145
Definition pspiofilemgr_kernel.h:45
PspIoDrvArg * drv
Definition pspiofilemgr_kernel.h:48
struct SceIoCwd * next
Definition pspiofilemgr_kernel.h:46
void * cwd_private
Definition pspiofilemgr_kernel.h:49
int ref_count
Definition pspiofilemgr_kernel.h:50
char * path_name
Definition pspiofilemgr_kernel.h:47
Describes a single directory entry.
Definition pspiofilemgr_dirent.h:31
Structure to hold the status information about a file.
Definition pspiofilemgr_stat.h:102