![]() |
vitasdk
Documentation of the vitasdk
|
#include <vitasdk/build_utils.h>#include <psp2common/kernel/iofilemgr.h>#include <psp2kern/kernel/threadmgr/fast_mutex.h>#include <psp2kern/types.h>Go to the source code of this file.
VFS Data Types | |
| #define | SCE_VFS_TYPE_FS (0x00000000) |
| #define | SCE_VFS_TYPE_DEVFS (0x00000010) |
| #define | SCE_VFS_FS_TYPE_FS (0x01) |
| All exfat mounts. | |
| #define | SCE_VFS_FS_TYPE_PFS (0x03) |
| PFS mounts. | |
| #define | SCE_VFS_FS_TYPE_HOSTFS (0x04) |
| host0: | |
| #define | SCE_VFS_FS_TYPE_BLKDEV (0x10) |
| sdstor0:, md0: | |
| #define | SCE_VFS_FS_TYPE_CHRDEV (0x20) |
| tty0: | |
| #define | SCE_VFS_MOUNT_TYPE_PFS (0x00000001) |
| PFS mounts. | |
| #define | SCE_VFS_MOUNT_TYPE_FSROOT (0x00000002) |
| Standard Root File System. | |
| #define | SCE_VFS_MOUNT_TYPE_DEVFS (0x00000003) |
| Device File System. | |
| #define | SCE_VFS_MOUNT_TYPE_STACKFS (0x00000005) |
| Loop File System (File system mounted from a file) | |
| #define | SCE_VFS_MOUNT_TYPE_HOSTFS (0x00000006) |
| Hostfs. | |
| #define | SCE_VFS_MOUNT_FLAG_TYPE_MASK (0x000000FF) |
| #define | SCE_VFS_MOUNT_FLAG_RDONLY (0x00001000) |
| Read-only mount. | |
| #define | SCE_VFS_MOUNT_FLAG_NOBUF (0x00002000) |
| Disables VFS Buffer Cache. | |
| #define | SCE_VFS_MOUNT_FLAG_NUMBERED (0x00004000) |
| Files for this mountpoint are treated as numbered extensions of the assignName. | |
| #define | SCE_VFS_MOUNT_FLAG_REMOTE (0x00008000) |
| Prevents ncache entry of failed lookups. Used on host0: | |
| #define | SCE_VFS_MOUNT_FLAG_INTERNAL (0x00010000) |
| #define | SCE_VFS_MOUNT_FLAG_EXTERNAL (0x00020000) |
| #define | SCE_VFS_MOUNT_FLAG_WRITE_CACHE (0x00040000) |
| Allow write-caching. Default behavior is to flush buffer cache after write. | |
| #define | SCE_VFS_MOUNT_FLAG_NO_RECLAIM (0x00100000) |
| Prevents Vnodes from being reclaimed. Only set internally for devfs. | |
| #define | SCE_VNODE_TYPE_REG (0x00000001) |
| Regular file. | |
| #define | SCE_VNODE_TYPE_DIR (0x00000002) |
| Regular directory. | |
| #define | SCE_VNODE_TYPE_CHR (0x00000010) |
| Character file. | |
| #define | SCE_VNODE_TYPE_ROOT (0x00001000) |
| Root vnode. | |
| #define | SCE_VNODE_TYPE_DEV (0x00002000) |
| Device vnode. | |
| #define | SCE_VNODE_TYPE_MOUNTED (0x00004000) |
| Vnode used as a backing for a mountpoint. | |
| #define | SCE_VNODE_TYPE_CHRDEV (SCE_VNODE_TYPE_DEV | SCE_VNODE_TYPE_CHR) |
| #define | SCE_VNODE_TYPE_ROOTDIR (SCE_VNODE_TYPE_ROOT | SCE_VNODE_TYPE_DIR) |
| Root directory. | |
| #define | SCE_VNODE_TYPE_ROOTDIR_DEVFS (0x10000 | 0x20) |
| Root directory on devfs mountpoints. | |
| #define | SCE_VNODE_STATE_ACTIVE (0x00000001) |
| Vnode is active and valid for all operations. | |
| #define | SCE_VNODE_STATE_INACTIVE (0x00000100) |
| Vnode is inactive and may be pending deletion or otherwise. | |
| #define | SCE_VNODE_STATE_UNMOUNTED (0x00000200) |
| #define | SCE_VNODE_STATE_DELETED (0x00000400) |
| #define | SCE_VNODE_STATE_RECLAIMED (0x00002000) |
| #define | SCE_VNODE_STATE_NEW (0x00008000) |
| #define | SCE_VFS_FILE_STATE_OPEN (0x00000001) |
| File is open. | |
| #define | SCE_VFS_FILE_STATE_CLOSED (0x00000200) |
| File is closed. | |
| #define | SCE_VFS_FILE_STATE_UNK (0x00000800) |
| Unknown status. | |
| #define | SCE_VFS_FILE_STATE_DUMMY (0x00010000) |
| Dummy file. | |
| VITASDK_BUILD_ASSERT_EQ (0x20, SceVfsInfo) | |
| VITASDK_BUILD_ASSERT_EQ (0xC, SceVfsPath) | |
| VITASDK_BUILD_ASSERT_EQ (0x14, SceVfsMountData) | |
| VITASDK_BUILD_ASSERT_EQ (0x100, SceVfsMount) | |
| VITASDK_BUILD_ASSERT_EQ (0x100, SceVfsVnode) | |
| VITASDK_BUILD_ASSERT_EQ (0x40, SceVfsFile) | |
VFS Core API | |
| #define | SCE_VFS_UMOUNT_FLAG_FORCE (0x1) |
| Force unmount. | |
| VITASDK_BUILD_ASSERT_EQ (0x20, SceVfsMountParam) | |
| VITASDK_BUILD_ASSERT_EQ (0x8, SceVfsUmountParam) | |
| int | ksceVfsAddVfs (SceVfsInfo *vfs_info) |
| Register a VFS implementation. | |
| int | ksceVfsDeleteVfs (const char *name, SceVfsInfo **vfs_info) |
| Unegister a VFS implementation. | |
| int | vfsMount (SceVfsMountParam *param) |
| Mount a drive. | |
| int | vfsUmount (SceVfsUmountParam *param) |
| Unmount a drive. | |
| int | vfsMountForPFS (SceVfsMountParam *param) |
| Mount a drive via the mount daemon. | |
| int | vfsUmountForPFS (SceVfsUmountParam *param, int unk, int unk2) |
| Unmount a drive via the mount daemon. | |
| int | vfsLockMnt (SceVfsMount *mnt) |
| Lock the mnt. | |
| int | vfsUnlockMnt (SceVfsMount *mnt) |
| Unlock the mnt. | |
| SceBool | vfsIsLockedMnt (SceVfsMount *mnt) |
| Is the mnt lock held by the current thread ? | |
| SceUID | vfsAllocateFile (SceVfsVnode *vp, SceVfsFile **file, const char *name) |
| Allocate a new VFS file object. | |
| int | vfsFreeFile (SceVfsVnode *vp, SceUID fd) |
| Free a File object. | |
| int | vfsGetNewVnode (SceVfsMount *mnt, SceVopTable *vops, int unk, SceVfsVnode **vpp) |
| Get a new vnode from the pool. | |
| int | vfsFreeVnode (SceVfsVnode *vp) |
| Return a vnode to the pool. | |
| int | vfsLockVnode (SceVfsVnode *vp) |
| Lock a vnode. | |
| int | vfsUnlockVnode (SceVfsVnode *vp) |
| Unlock a vnode. | |
| SceBool | vfsIsOwnerVnode (SceVfsVnode *vp) |
| Does the current thread own the vnode lock. | |
| int | vfsGetVnodeName (SceVfsVnode *vp, char *name, SceSize n, SceSize *result) |
| Get the name of a vnode. | |