ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
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
unsigned
int
mode
;
49
unsigned
int
attr
;
50
unsigned
int
size
;
51
unsigned
char
ctime[8];
52
unsigned
char
atime[8];
53
unsigned
char
mtime[8];
54
unsigned
int
hisize
;
55
}
io_stat_t
;
56
57
typedef
struct
{
58
io_stat_t
stat
;
59
char
name[256];
60
unsigned
int
unknown
;
61
}
io_dirent_t
;
62
63
#endif
/* __IO_COMMON_H__ */
io_dirent_t
Definition:
io_common.h:57
io_dirent_t::unknown
unsigned int unknown
Definition:
io_common.h:60
io_dirent_t::stat
io_stat_t stat
Definition:
io_common.h:58
io_stat_t
Definition:
io_common.h:47
io_stat_t::size
unsigned int size
Definition:
io_common.h:50
io_stat_t::mode
unsigned int mode
Definition:
io_common.h:48
io_stat_t::hisize
unsigned int hisize
Definition:
io_common.h:54
io_stat_t::attr
unsigned int attr
Definition:
io_common.h:49
common
include
io_common.h
Generated on Thu Feb 11 2021 11:42:21 for ps2sdk by
1.9.2