sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
pfs.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7
# Licenced under Academic Free License version 2.0
8
# Review ps2sdk README & LICENSE files for further details.
9
*/
10
15
#ifndef _PFS_H
16
#define _PFS_H
17
18
#ifndef min
19
#define min(a, b) ((a) < (b) ? (a) : (b))
20
#endif
21
23
// Global types
24
25
typedef
struct
26
{
27
u16 dirty;
// Whether the buffer is dirty or not.
28
u16 sub;
// Sub/main partition
29
u32 sector;
// Sector
30
u8 buffer[512];
// used for reading mis-aligned/remainder data
31
}
pfs_unaligned_io_t
;
32
33
#define PFS_AENTRY_KEY_MAX 256
34
#define PFS_AENTRY_VALUE_MAX 256
35
36
typedef
struct
37
{
38
char
key[PFS_AENTRY_KEY_MAX];
39
char
value[PFS_AENTRY_VALUE_MAX];
40
}
pfs_ioctl2attr_t
;
41
42
typedef
struct
{
43
iomanX_iop_file_t
*fd;
//
44
pfs_cache_t *clink;
//
45
u32 aentryOffset;
// used for read offset
46
u64 position;
//
47
pfs_blockpos_t
block_pos;
// current position into file
48
pfs_unaligned_io_t
unaligned;
// Contains unaligned data (data can only be read from the HDD in units of 512)
49
}
pfs_file_slot_t
;
50
51
typedef
struct
{
52
u32 maxMount;
53
u32 maxOpen;
54
}
pfs_config_t
;
55
57
// Global defines
58
59
// mount flags
60
#define PFS_MOUNT_BUSY 0x8000
61
63
// Function declarations
64
65
extern
pfs_mount_t
*pfsGetMountedUnit(s32 unit);
66
extern
void
pfsClearMount(
pfs_mount_t
*pfsMount);
67
68
#endif
/* _PFS_H */
iomanX_iop_file_t
struct _iomanX_iop_file iomanX_iop_file_t
pfs_blockpos_t
Definition
libpfs.h:218
pfs_config_t
Definition
pfs.h:51
pfs_file_slot_t
Definition
pfs.h:42
pfs_ioctl2attr_t
Definition
pfs.h:37
pfs_mount_t
Definition
libpfs.h:182
pfs_unaligned_io_t
Definition
pfs.h:26
core
fs
src
pfs.h
Generated by
1.18.0