forked from ps3dev/PSL1GHT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfile.h
More file actions
139 lines (114 loc) · 2.66 KB
/
file.h
File metadata and controls
139 lines (114 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/*! \file file.h
\brief File management functions.
*/
#ifndef __SYS_FILE_H__
#define __SYS_FILE_H__
#include <ppu-lv2.h>
#include <lv2/sysfs.h>
#ifdef __cplusplus
extern "C" {
#endif
LV2_SYSCALL sysLv2FsOpen(const char *path,s32 oflags,s32 *fd,u32 mode,const void *arg,u64 argsize)
{
lv2syscall6(801,(u64)path,oflags,(u64)fd,mode,(u64)arg,argsize);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsClose(s32 fd)
{
lv2syscall1(804,fd);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsRead(s32 fd,void *ptr,u64 len,u64 *read)
{
lv2syscall4(802,fd,(u64)ptr,len,(u64)read);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsWrite(s32 fd,const void *ptr,u64 len,u64 *written)
{
lv2syscall4(803,fd,(u64)ptr,len,(u64)written);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsStat(const char *path,sysFSStat *stat)
{
lv2syscall2(808,(u64)path,(u64)stat);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsFStat(s32 fd,sysFSStat *stat)
{
lv2syscall2(809,fd,(u64)stat);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsChmod(const char *path,s32 mode)
{
lv2syscall2(834,(u64)path,mode);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsOpenDir(const char *path,s32 *fd)
{
lv2syscall2(805,(u64)path,(u64)fd);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsReadDir(s32 fd,sysFSDirent *entry,u64 *read)
{
lv2syscall3(806,fd,(u64)entry,(u64)read);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsCloseDir(s32 fd)
{
lv2syscall1(807,fd);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsMkdir(const char *path,s32 mode)
{
lv2syscall2(811,(u64)path,mode);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsRename(const char *path,const char *newpath)
{
lv2syscall2(812,(u64)path,(u64)newpath);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsRmdir(const char *path)
{
lv2syscall1(813,(u64)path);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsLSeek64(s32 fd,u64 offset,s32 dir,u64 *pos)
{
lv2syscall4(818,fd,offset,dir,(u64)pos);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsUnlink(const char *path)
{
lv2syscall1(814,(u64)path);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsFsync(s32 fd)
{
lv2syscall1(820,fd);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsTruncate(const char *path,u64 size)
{
lv2syscall2(831,(u64)path,size);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsFtruncate(s32 fd,u64 size)
{
lv2syscall2(832,fd,size);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsUtime(const char *path,const sysFSUtimbuf *times)
{
lv2syscall2(815,(u64)path,(u64)times);
return_to_user_prog(s32);
}
LV2_SYSCALL sysLv2FsLink(const char *oldpath,const char *newpath)
{
lv2syscall2(810,(u64)oldpath,(u64)newpath);
return_to_user_prog(s32);
}
#ifdef __cplusplus
}
#endif
#endif