sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
fileio-common.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright 2001-2009, 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
16
17
#ifndef __FILEIO_COMMON_H__
18
#define __FILEIO_COMMON_H__
19
20
#include <
tamtypes.h
>
21
#include <
io_common.h
>
22
23
// fileio common definitions
24
25
enum
_fio_functions {
26
FIO_F_OPEN = 0,
27
FIO_F_CLOSE,
28
FIO_F_READ,
29
FIO_F_WRITE,
30
FIO_F_LSEEK,
31
FIO_F_IOCTL,
32
FIO_F_REMOVE,
33
FIO_F_MKDIR,
34
FIO_F_RMDIR,
35
FIO_F_DOPEN,
36
FIO_F_DCLOSE,
37
FIO_F_DREAD,
38
FIO_F_GETSTAT,
39
FIO_F_CHSTAT,
40
FIO_F_FORMAT,
41
FIO_F_ADDDRV,
42
FIO_F_DELDRV,
43
};
44
47
struct
_fio_read_data
48
{
49
u32 size1;
50
u32 size2;
51
void
*dest1;
52
void
*dest2;
53
u8 buf1[16];
54
u8 buf2[16];
55
};
56
57
#define FIO_PATH_MAX 256
58
59
struct
_fio_open_arg
60
{
61
int
mode;
62
char
name[FIO_PATH_MAX];
63
}
__attribute__
((aligned(16)));
64
65
struct
_fio_read_arg
66
{
67
int
fd;
68
void
*ptr;
69
int
size;
70
struct
_fio_read_data
*read_data;
71
}
__attribute__
((aligned(16)));
72
73
struct
_fio_write_arg
74
{
75
int
fd;
76
const
void
*ptr;
77
u32 size;
78
u32 mis;
79
u8 aligned[16];
80
}
__attribute__
((aligned(16)));
81
82
struct
_fio_lseek_arg
83
{
84
union
85
{
86
int
fd;
87
int
result;
88
} p;
89
int
offset;
90
int
whence;
91
}
__attribute__
((aligned(16)));
92
93
struct
_fio_ioctl_arg
94
{
95
union
96
{
97
int
fd;
98
int
result;
99
} p;
100
int
request;
101
u8 data[1024];
// Will this be ok ?
102
}
__attribute__
((aligned(16)));
103
104
struct
_fio_dread_arg
105
{
106
union
107
{
108
int
fd;
109
int
result;
110
} p;
111
io_dirent_t
*buf;
112
}
__attribute__
((aligned(16)));
113
114
struct
_fio_getstat_arg
115
{
116
union
117
{
118
io_stat_t
*buf;
119
int
result;
120
} p;
121
char
name[FIO_PATH_MAX];
122
}
__attribute__
((aligned(16)));
123
124
struct
_fio_chstat_arg
125
{
126
union
127
{
128
int
cbit;
129
int
result;
130
} p;
131
io_stat_t
stat;
132
char
name[FIO_PATH_MAX];
133
};
134
135
#endif
/* __FILEIO_COMMON_H__ */
io_common.h
__attribute__
Definition
gif_registers.h:40
_fio_chstat_arg
Definition
fileio-common.h:125
_fio_dread_arg
Definition
fileio-common.h:105
_fio_getstat_arg
Definition
fileio-common.h:115
_fio_ioctl_arg
Definition
fileio-common.h:94
_fio_lseek_arg
Definition
fileio-common.h:83
_fio_open_arg
Definition
fileio-common.h:60
_fio_read_arg
Definition
fileio-common.h:66
_fio_read_data
Definition
fileio-common.h:48
_fio_write_arg
Definition
fileio-common.h:74
io_dirent_t
Definition
io_common.h:60
io_stat_t
Definition
io_common.h:49
tamtypes.h
core
common
include
fileio-common.h
Generated by
1.18.0