PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
io_common.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright 2001-2004, 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 __IO_COMMON_H__
17
#define __IO_COMMON_H__
18
19
#include <sys/fcntl.h>
20
#include <sys/unistd.h>
21
22
#ifdef _EE
23
#ifndef NEWLIB_PORT_AWARE
24
#error "Using fio/fileXio functions directly in the newlib port will lead to problems."
25
#error "Use posix function calls instead."
26
#endif
27
#endif
28
29
#define FIO_O_RDONLY 0x0001
30
#define FIO_O_WRONLY 0x0002
31
#define FIO_O_RDWR 0x0003
32
#define FIO_O_DIROPEN 0x0008
// Internal use for dopen
33
#define FIO_O_NBLOCK 0x0010
34
#define FIO_O_APPEND 0x0100
35
#define FIO_O_CREAT 0x0200
36
#define FIO_O_TRUNC 0x0400
37
#define FIO_O_EXCL 0x0800
38
#define FIO_O_NOWAIT 0x8000
39
40
#define FIO_MT_RDWR 0x00
41
#define FIO_MT_RDONLY 0x01
42
43
#define FIO_SEEK_SET 0
44
#define FIO_SEEK_CUR 1
45
#define FIO_SEEK_END 2
46
47
typedef
struct
48
{
49
unsigned
int
mode;
50
unsigned
int
attr;
51
unsigned
int
size;
52
unsigned
char
ctime[8];
53
unsigned
char
atime[8];
54
unsigned
char
mtime[8];
55
unsigned
int
hisize;
56
}
io_stat_t
;
57
58
typedef
struct
59
{
60
io_stat_t
stat;
61
char
name[256];
62
void
*privdata;
63
}
io_dirent_t
;
64
65
#endif
/* __IO_COMMON_H__ */
io_dirent_t
Definition
io_common.h:59
io_stat_t
Definition
io_common.h:48
common
include
io_common.h
Generated on Thu Nov 14 2024 05:25:24 for PS2SDK by
1.9.8