vitasdk
Documentation of the vitasdk

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceIofilemgrForDriver_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (0x18, SceIoDevInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x58, SceIoStat)
 
 VITASDK_BUILD_ASSERT_EQ (0x160, SceIoDirent)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceIoFdInfo)
 
int ksceIoGetGUIDFdListForDebugger (int vis_level, SceIoFdInfo *dst, SceSize max_size, SceSize *res_size)
 Get global file descriptor. More...
 
int ksceIoGetPUIDFdListForDebugger (int vis_level, SceIoFdInfo *dst, SceSize max_size, SceSize *res_size)
 Get process file descriptor. More...
 
 VITASDK_BUILD_ASSERT_EQ (0x828, SceIofileInfo)
 
int ksceIoGetFileInfo (SceUID fd, SceUID pid, SceIofileInfo *info)
 Get file info. More...
 
int ksceIoMount (int id, const char *path, int permission, int a4, int a5, int a6)
 Mounts a device. More...
 
int ksceIoUmount (int id, int a2, int a3, int a4)
 Unmounts a device. More...
 
int ksceIoGetRemoteKPLSData (SceUID pid, void *dst)
 Get Remote Kernel Process Local Storage Data. More...
 

Macros

#define SCE_S_ISLNK(m)   (((m) & SCE_S_IFMT) == SCE_S_IFLNK)
 
#define SCE_S_ISREG(m)   (((m) & SCE_S_IFMT) == SCE_S_IFREG)
 
#define SCE_S_ISDIR(m)   (((m) & SCE_S_IFMT) == SCE_S_IFDIR)
 
#define SCE_SO_ISLNK(m)   (((m) & SCE_SO_IFMT) == SCE_SO_IFLNK)
 
#define SCE_SO_ISREG(m)   (((m) & SCE_SO_IFMT) == SCE_SO_IFREG)
 
#define SCE_SO_ISDIR(m)   (((m) & SCE_SO_IFMT) == SCE_SO_IFDIR)
 
#define SCE_CST_MODE   0x0001
 Defines for sceIoChstat and sceIoChstatByFd More...
 
#define SCE_CST_SIZE   0x0004
 
#define SCE_CST_CT   0x0008
 
#define SCE_CST_AT   0x0010
 
#define SCE_CST_MT   0x0020
 
#define ksceIoGetGUIDFdList   ksceIoGetGUIDFdListForDebugger
 
#define ksceIoGetPUIDFdList   ksceIoGetPUIDFdListForDebugger
 

Data Structure Documentation

◆ SceIoDevInfo

struct SceIoDevInfo
Data Fields
SceOff max_size
SceOff free_size
SceSize cluster_size
void * unk

◆ SceIoStat

struct SceIoStat

Structure to hold the status information about a file.

Data Fields
SceMode st_mode One or more SceIoAccessMode.
unsigned int st_attr One or more SceIoFileMode.
SceOff st_size Size of the file in bytes.
SceDateTime st_ctime Creation time.
SceDateTime st_atime Last access time.
SceDateTime st_mtime Last modification time.
unsigned int st_private[6] Device-specific data.

◆ SceIoDirent

struct SceIoDirent

Describes a single directory entry.

Data Fields
SceIoStat d_stat File status.
char d_name[256] File name.
void * d_private Device-specific data.
int dummy Dummy data.

◆ SceIoFdInfo

struct SceIoFdInfo
Data Fields
SceUID fd
SceUID pid

◆ SceIofileInfo

struct SceIofileInfo
Data Fields
char path[0x400]
char path2[0x400]
SceUID pid
int data_0x804
int data_0x808
int data_0x80C
int data_0x810
int data_0x814
int data_0x818
int data_0x81C
int data_0x820
int data_0x824

Macro Definition Documentation

◆ SCE_S_ISLNK

#define SCE_S_ISLNK (   m)    (((m) & SCE_S_IFMT) == SCE_S_IFLNK)

◆ SCE_S_ISREG

#define SCE_S_ISREG (   m)    (((m) & SCE_S_IFMT) == SCE_S_IFREG)

◆ SCE_S_ISDIR

#define SCE_S_ISDIR (   m)    (((m) & SCE_S_IFMT) == SCE_S_IFDIR)

◆ SCE_SO_ISLNK

#define SCE_SO_ISLNK (   m)    (((m) & SCE_SO_IFMT) == SCE_SO_IFLNK)

◆ SCE_SO_ISREG

#define SCE_SO_ISREG (   m)    (((m) & SCE_SO_IFMT) == SCE_SO_IFREG)

◆ SCE_SO_ISDIR

#define SCE_SO_ISDIR (   m)    (((m) & SCE_SO_IFMT) == SCE_SO_IFDIR)

◆ SCE_CST_MODE

#define SCE_CST_MODE   0x0001

Defines for sceIoChstat and sceIoChstatByFd

◆ SCE_CST_SIZE

#define SCE_CST_SIZE   0x0004

◆ SCE_CST_CT

#define SCE_CST_CT   0x0008

◆ SCE_CST_AT

#define SCE_CST_AT   0x0010

◆ SCE_CST_MT

#define SCE_CST_MT   0x0020

◆ ksceIoGetGUIDFdList

#define ksceIoGetGUIDFdList   ksceIoGetGUIDFdListForDebugger

◆ ksceIoGetPUIDFdList

#define ksceIoGetPUIDFdList   ksceIoGetPUIDFdListForDebugger

Enumeration Type Documentation

◆ SceIoMode

enum SceIoMode
Enumerator
SCE_O_RDONLY 

Read-only.

SCE_O_WRONLY 

Write-only.

SCE_O_RDWR 

Read/Write.

SCE_O_NBLOCK 

Non blocking.

SCE_O_DIROPEN 

Internal use for sceIoDopen.

SCE_O_RDLOCK 

Read locked (non-shared)

SCE_O_WRLOCK 

Write locked (non-shared)

SCE_O_APPEND 

Append.

SCE_O_CREAT 

Create.

SCE_O_TRUNC 

Truncate.

SCE_O_EXCL 

Exclusive create.

SCE_O_SCAN 

Scan type.

SCE_O_RCOM 

Remote command entry.

SCE_O_NOBUF 

Number device buffer.

SCE_O_NOWAIT 

Asynchronous I/O.

SCE_O_FDEXCL 

Exclusive access.

SCE_O_PWLOCK 

Power control lock.

SCE_O_FGAMEDATA 

Gamedata access.

◆ SceIoSeekMode

Enumerator
SCE_SEEK_SET 

Starts from the begin of the file.

SCE_SEEK_CUR 

Starts from current position.

SCE_SEEK_END 

Starts from the end of the file.

◆ SceIoDevType

Enumerator
SCE_DEV_TYPE_NULL 

Dummy device.

SCE_DEV_TYPE_CHAR 

Character device.

SCE_DEV_TYPE_BLOCK 

Block device.

SCE_DEV_TYPE_FS 

File system device.

SCE_DEV_TYPE_ALIAS 

Alias name.

SCE_DEV_TYPE_MOUNTPT 

Mount point.

◆ SceIoAccessMode

Access modes for st_mode in SceIoStat.

Note
System always requires RW access. For safe homebrew system software will force system permission field to RW. For unsafe homebrew, you need to set it yourself ( mode | SCE_S_IWSYS | SCE_S_IRSYS)
Enumerator
SCE_S_IXUSR 

User execute permission.

SCE_S_IWUSR 

User write permission.

SCE_S_IRUSR 

User read permission.

SCE_S_IRWXU 

User access rights mask.

SCE_S_IXGRP 

Group execute permission. Ignored and reset to 0 by system.

SCE_S_IWGRP 

Group write permission. Ignored and reset to 0 by system.

SCE_S_IRGRP 

Group read permission. Ignored and reset to 0 by system.

SCE_S_IRWXG 

Group access rights mask. Ignored and reset to 0 by system.

SCE_S_IXSYS 

System execute permission.

SCE_S_IWSYS 

System write permission.

SCE_S_IRSYS 

System read permission.

SCE_S_IRWXS 

System access rights mask.

SCE_S_IXOTH 

Others execute permission. Deprecated, use SCE_S_IXSYS.

SCE_S_IWOTH 

Others write permission. Deprecated, use SCE_S_IXSYS.

SCE_S_IROTH 

Others read permission. Deprecated, use SCE_S_IXSYS.

SCE_S_IRWXO 

Others access rights mask. Deprecated, use SCE_S_IRWXS.

SCE_S_ISVTX 

Sticky. Deprecated.

SCE_S_ISGID 

Set GID. Deprecated.

SCE_S_ISUID 

Set UID. Deprecated.

SCE_S_IFDIR 

Directory.

SCE_S_IFREG 

Regular file.

SCE_S_IFLNK 

Symbolic link.

SCE_S_IFMT 

Format bits mask.

◆ SceIoFileMode

File modes, used for the st_attr parameter in SceIoStat.

Enumerator
SCE_SO_IXOTH 

Hidden execute permission.

SCE_SO_IWOTH 

Hidden write permission.

SCE_SO_IROTH 

Hidden read permission.

SCE_SO_IFLNK 

Symbolic link.

SCE_SO_IFDIR 

Directory.

SCE_SO_IFREG 

Regular file.

SCE_SO_IFMT 

Format mask.

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/5]

VITASDK_BUILD_ASSERT_EQ ( 0x18  ,
SceIoDevInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/5]

VITASDK_BUILD_ASSERT_EQ ( 0x58  ,
SceIoStat   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/5]

VITASDK_BUILD_ASSERT_EQ ( 0x160  ,
SceIoDirent   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/5]

VITASDK_BUILD_ASSERT_EQ ( ,
SceIoFdInfo   
)

◆ ksceIoGetGUIDFdListForDebugger()

int ksceIoGetGUIDFdListForDebugger ( int  vis_level,
SceIoFdInfo dst,
SceSize  max_size,
SceSize res_size 
)

Get global file descriptor.

Parameters
[in]vis_level- unknown, set 5
[out]dst- fd list output
[in]max_size- dst array count
[out]res_size- result array count output
Returns
< 0 on error.

◆ ksceIoGetPUIDFdListForDebugger()

int ksceIoGetPUIDFdListForDebugger ( int  vis_level,
SceIoFdInfo dst,
SceSize  max_size,
SceSize res_size 
)

Get process file descriptor.

Parameters
[in]vis_level- unknown, set 5
[out]dst- fd list output
[in]max_size- dst array count
[out]res_size- result array count output
Returns
< 0 on error.

◆ VITASDK_BUILD_ASSERT_EQ() [5/5]

VITASDK_BUILD_ASSERT_EQ ( 0x828  ,
SceIofileInfo   
)

◆ ksceIoGetFileInfo()

int ksceIoGetFileInfo ( SceUID  fd,
SceUID  pid,
SceIofileInfo info 
)

Get file info.

Parameters
[in]fd- file descriptor
[in]pid- process id
[out]info- fd info output
Returns
< 0 on error.

◆ ksceIoMount()

int ksceIoMount ( int  id,
const char *  path,
int  permission,
int  a4,
int  a5,
int  a6 
)

Mounts a device.

Parameters
[in]idDevice to mount
[in]pathWhere to mount to
[in]permissionPermission flags
a4Unknown, set to 0
a5Unknown, set to 0
a6Unknown, set to 0
Returns
< 0 on error.

◆ ksceIoUmount()

int ksceIoUmount ( int  id,
int  a2,
int  a3,
int  a4 
)

Unmounts a device.

Parameters
[in]idDevice to unmount
[in]a2Unknown, set to 0
[in]a3Unknown, set to 0
[in]a4Unknown, set to 0
Returns
< 0 on error.

◆ ksceIoGetRemoteKPLSData()

int ksceIoGetRemoteKPLSData ( SceUID  pid,
void *  dst 
)

Get Remote Kernel Process Local Storage Data.

Parameters
[in]pid- The target process id
[out]dst- The pointer of RemoteKPLS output buffer. size is 0x1C.
Returns
< 0 on error.