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
24enum _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
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
59{
60 int mode;
61 char name[FIO_PATH_MAX];
62} __attribute__((aligned(16)));
63
65{
66 int fd;
67 void *ptr;
68 int size;
69 struct _fio_read_data *read_data;
70} __attribute__((aligned(16)));
71
73{
74 int fd;
75 const void *ptr;
76 u32 size;
77 u32 mis;
78 u8 aligned[16];
79} __attribute__((aligned(16)));
80
82{
83 union
84 {
85 int fd;
86 int result;
87 } p;
88 int offset;
89 int whence;
90} __attribute__((aligned(16)));
91
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
104{
105 union
106 {
107 int fd;
108 int result;
109 } p;
110 io_dirent_t *buf;
111} __attribute__((aligned(16)));
112
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
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__ */