sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
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
25enum _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
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
60{
61 int mode;
62 char name[FIO_PATH_MAX];
63} __attribute__((aligned(16)));
64
66{
67 int fd;
68 void *ptr;
69 int size;
70 struct _fio_read_data *read_data;
71} __attribute__((aligned(16)));
72
74{
75 int fd;
76 const void *ptr;
77 u32 size;
78 u32 mis;
79 u8 aligned[16];
80} __attribute__((aligned(16)));
81
83{
84 union
85 {
86 int fd;
87 int result;
88 } p;
89 int offset;
90 int whence;
91} __attribute__((aligned(16)));
92
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
105{
106 union
107 {
108 int fd;
109 int result;
110 } p;
111 io_dirent_t *buf;
112} __attribute__((aligned(16)));
113
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
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__ */