PS2SDK
PS2 Homebrew Libraries
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
#ifndef __FILEIO_COMMON_H__
17
#define __FILEIO_COMMON_H__
18
19
#include <
tamtypes.h
>
20
#include <
io_common.h
>
21
22
// fileio common definitions
23
25
#define FIO_DEFAULT_XFER_SIZE (16 * 1024)
26
27
enum
_fio_functions {
28
FIO_F_OPEN = 0,
29
FIO_F_CLOSE,
30
FIO_F_READ,
31
FIO_F_WRITE,
32
FIO_F_LSEEK,
33
FIO_F_IOCTL,
34
FIO_F_REMOVE,
35
FIO_F_MKDIR,
36
FIO_F_RMDIR,
37
FIO_F_DOPEN,
38
FIO_F_DCLOSE,
39
FIO_F_DREAD,
40
FIO_F_GETSTAT,
41
FIO_F_CHSTAT,
42
FIO_F_FORMAT,
43
FIO_F_ADDDRV,
44
FIO_F_DELDRV,
45
};
46
49
struct
_fio_read_data
50
{
51
u32 size1;
52
u32 size2;
53
void
*dest1;
54
void
*dest2;
55
u8 buf1[16];
56
u8 buf2[16];
57
};
58
59
#define FIO_PATH_MAX 256
60
61
struct
_fio_open_arg
62
{
63
int
mode;
64
char
name[FIO_PATH_MAX];
65
}
__attribute__
((
aligned
(16)));
66
67
struct
_fio_read_arg
68
{
69
int
fd;
70
void
*ptr;
71
int
size;
72
struct
_fio_read_data
*read_data;
73
}
__attribute__
((
aligned
(16)));
74
75
struct
_fio_write_arg
76
{
77
int
fd;
78
const
void
*ptr;
79
u32 size;
80
u32 mis;
81
u8
aligned
[16];
82
}
__attribute__
((
aligned
(16)));
83
84
struct
_fio_lseek_arg
85
{
86
union
87
{
88
int
fd;
89
int
result;
90
} p;
91
int
offset;
92
int
whence;
93
}
__attribute__
((
aligned
(16)));
94
95
struct
_fio_ioctl_arg
96
{
97
union
98
{
99
int
fd;
100
int
result;
101
} p;
102
int
request
;
103
u8 data[1024];
// Will this be ok ?
104
}
__attribute__
((
aligned
(16)));
105
106
struct
_fio_dread_arg
107
{
108
union
109
{
110
int
fd;
111
int
result;
112
} p;
113
io_dirent_t
*buf;
114
}
__attribute__
((
aligned
(16)));
115
116
struct
_fio_getstat_arg
117
{
118
union
119
{
120
io_stat_t
*buf;
121
int
result;
122
} p;
123
char
name[FIO_PATH_MAX];
124
}
__attribute__
((
aligned
(16)));
125
126
struct
_fio_chstat_arg
127
{
128
union
129
{
130
int
cbit;
131
int
result;
132
} p;
133
io_stat_t
stat;
134
char
name[FIO_PATH_MAX];
135
};
136
137
#endif
/* __FILEIO_COMMON_H__ */
io_common.h
request
Definition:
thread.c:17
_fio_dread_arg
Definition:
fileio-common.h:106
_fio_ioctl_arg
Definition:
fileio-common.h:95
_fio_chstat_arg
Definition:
fileio-common.h:126
_fio_open_arg
Definition:
fileio-common.h:61
_fio_read_arg
Definition:
fileio-common.h:67
tamtypes.h
io_stat_t
Definition:
io_common.h:47
_fio_read_data
Definition:
fileio-common.h:49
io_dirent_t
Definition:
io_common.h:58
__attribute__
Definition:
gif_registers.h:38
_fio_getstat_arg
Definition:
fileio-common.h:116
_fio_lseek_arg
Definition:
fileio-common.h:84
_fio_write_arg
Definition:
fileio-common.h:75
common
include
fileio-common.h
Generated on Tue Oct 6 2026 23:20:12 for PS2SDK by
1.8.17