sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
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
25typedef 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
32
33#define PFS_AENTRY_KEY_MAX 256
34#define PFS_AENTRY_VALUE_MAX 256
35
36typedef struct
37{
38 char key[PFS_AENTRY_KEY_MAX];
39 char value[PFS_AENTRY_VALUE_MAX];
41
42typedef 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)
50
51typedef struct {
52 u32 maxMount;
53 u32 maxOpen;
55
57// Global defines
58
59// mount flags
60#define PFS_MOUNT_BUSY 0x8000
61
63// Function declarations
64
65extern pfs_mount_t *pfsGetMountedUnit(s32 unit);
66extern void pfsClearMount(pfs_mount_t *pfsMount);
67
68#endif /* _PFS_H */
struct _iomanX_iop_file iomanX_iop_file_t