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