psl1ght
A free SDK for Sony's PS3 console
Loading...
Searching...
No Matches
file.h
Go to the documentation of this file.
1
5#ifndef __SYS_FILE_H__
6#define __SYS_FILE_H__
7
8#include <ppu-lv2.h>
9#include <lv2/sysfs.h>
10
11#ifdef __cplusplus
12 extern "C" {
13#endif
14
15LV2_SYSCALL sysLv2FsOpen(const char *path,s32 oflags,s32 *fd,u32 mode,const void *arg,u64 argsize)
16{
17 lv2syscall6(801,(u64)path,oflags,(u64)fd,mode,(u64)arg,argsize);
18 return_to_user_prog(s32);
19}
20
21LV2_SYSCALL sysLv2FsClose(s32 fd)
22{
23 lv2syscall1(804,fd);
24 return_to_user_prog(s32);
25}
26
27LV2_SYSCALL sysLv2FsRead(s32 fd,void *ptr,u64 len,u64 *read)
28{
29 lv2syscall4(802,fd,(u64)ptr,len,(u64)read);
30 return_to_user_prog(s32);
31}
32
33LV2_SYSCALL sysLv2FsWrite(s32 fd,const void *ptr,u64 len,u64 *written)
34{
35 lv2syscall4(803,fd,(u64)ptr,len,(u64)written);
36 return_to_user_prog(s32);
37}
38
39LV2_SYSCALL sysLv2FsStat(const char *path,sysFSStat *stat)
40{
41 lv2syscall2(808,(u64)path,(u64)stat);
42 return_to_user_prog(s32);
43}
44
45LV2_SYSCALL sysLv2FsFStat(s32 fd,sysFSStat *stat)
46{
47 lv2syscall2(809,fd,(u64)stat);
48 return_to_user_prog(s32);
49}
50
51LV2_SYSCALL sysLv2FsChmod(const char *path,s32 mode)
52{
53 lv2syscall2(834,(u64)path,mode);
54 return_to_user_prog(s32);
55}
56
57LV2_SYSCALL sysLv2FsOpenDir(const char *path,s32 *fd)
58{
59 lv2syscall2(805,(u64)path,(u64)fd);
60 return_to_user_prog(s32);
61}
62
63LV2_SYSCALL sysLv2FsReadDir(s32 fd,sysFSDirent *entry,u64 *read)
64{
65 lv2syscall3(806,fd,(u64)entry,(u64)read);
66 return_to_user_prog(s32);
67}
68
69LV2_SYSCALL sysLv2FsCloseDir(s32 fd)
70{
71 lv2syscall1(807,fd);
72 return_to_user_prog(s32);
73}
74
75LV2_SYSCALL sysLv2FsMkdir(const char *path,s32 mode)
76{
77 lv2syscall2(811,(u64)path,mode);
78 return_to_user_prog(s32);
79}
80
81LV2_SYSCALL sysLv2FsRename(const char *path,const char *newpath)
82{
83 lv2syscall2(812,(u64)path,(u64)newpath);
84 return_to_user_prog(s32);
85}
86
87LV2_SYSCALL sysLv2FsRmdir(const char *path)
88{
89 lv2syscall1(813,(u64)path);
90 return_to_user_prog(s32);
91}
92
93LV2_SYSCALL sysLv2FsLSeek64(s32 fd,u64 offset,s32 dir,u64 *pos)
94{
95 lv2syscall4(818,fd,offset,dir,(u64)pos);
96 return_to_user_prog(s32);
97}
98
99LV2_SYSCALL sysLv2FsUnlink(const char *path)
100{
101 lv2syscall1(814,(u64)path);
102 return_to_user_prog(s32);
103}
104
105LV2_SYSCALL sysLv2FsFsync(s32 fd)
106{
107 lv2syscall1(820,fd);
108 return_to_user_prog(s32);
109}
110
111LV2_SYSCALL sysLv2FsTruncate(const char *path,u64 size)
112{
113 lv2syscall2(831,(u64)path,size);
114 return_to_user_prog(s32);
115}
116
117LV2_SYSCALL sysLv2FsFtruncate(s32 fd,u64 size)
118{
119 lv2syscall2(832,fd,size);
120 return_to_user_prog(s32);
121}
122
123LV2_SYSCALL sysLv2FsUtime(const char *path,const sysFSUtimbuf *times)
124{
125 lv2syscall2(815,(u64)path,(u64)times);
126 return_to_user_prog(s32);
127}
128
129LV2_SYSCALL sysLv2FsLink(const char *oldpath,const char *newpath)
130{
131 lv2syscall2(810,(u64)oldpath,(u64)newpath);
132 return_to_user_prog(s32);
133}
134
135#ifdef __cplusplus
136 }
137#endif
138
139#endif
LV2_SYSCALL sysLv2FsRead(s32 fd, void *ptr, u64 len, u64 *read)
Definition file.h:27
LV2_SYSCALL sysLv2FsLSeek64(s32 fd, u64 offset, s32 dir, u64 *pos)
Definition file.h:93
LV2_SYSCALL sysLv2FsWrite(s32 fd, const void *ptr, u64 len, u64 *written)
Definition file.h:33
LV2_SYSCALL sysLv2FsRename(const char *path, const char *newpath)
Definition file.h:81
LV2_SYSCALL sysLv2FsReadDir(s32 fd, sysFSDirent *entry, u64 *read)
Definition file.h:63
LV2_SYSCALL sysLv2FsUnlink(const char *path)
Definition file.h:99
LV2_SYSCALL sysLv2FsFStat(s32 fd, sysFSStat *stat)
Definition file.h:45
LV2_SYSCALL sysLv2FsFtruncate(s32 fd, u64 size)
Definition file.h:117
LV2_SYSCALL sysLv2FsLink(const char *oldpath, const char *newpath)
Definition file.h:129
LV2_SYSCALL sysLv2FsUtime(const char *path, const sysFSUtimbuf *times)
Definition file.h:123
LV2_SYSCALL sysLv2FsStat(const char *path, sysFSStat *stat)
Definition file.h:39
LV2_SYSCALL sysLv2FsClose(s32 fd)
Definition file.h:21
LV2_SYSCALL sysLv2FsFsync(s32 fd)
Definition file.h:105
LV2_SYSCALL sysLv2FsRmdir(const char *path)
Definition file.h:87
LV2_SYSCALL sysLv2FsOpen(const char *path, s32 oflags, s32 *fd, u32 mode, const void *arg, u64 argsize)
Definition file.h:15
LV2_SYSCALL sysLv2FsOpenDir(const char *path, s32 *fd)
Definition file.h:57
LV2_SYSCALL sysLv2FsChmod(const char *path, s32 mode)
Definition file.h:51
LV2_SYSCALL sysLv2FsTruncate(const char *path, u64 size)
Definition file.h:111
LV2_SYSCALL sysLv2FsMkdir(const char *path, s32 mode)
Definition file.h:75
LV2_SYSCALL sysLv2FsCloseDir(s32 fd)
Definition file.h:69
uintptr_t size
Definition heap.h:1