summaryrefslogtreecommitdiff
path: root/uisimulator/x11/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/x11/io.c')
-rw-r--r--uisimulator/x11/io.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/uisimulator/x11/io.c b/uisimulator/x11/io.c
index 2951b1f4a0..5890254b79 100644
--- a/uisimulator/x11/io.c
+++ b/uisimulator/x11/io.c
@@ -109,6 +109,32 @@ int x11_open(char *name, int opts)
109 return open(name, opts); 109 return open(name, opts);
110} 110}
111 111
112int x11_creat(char *name, int mode)
113{
114 char buffer[256]; /* sufficiently big */
115
116 if(name[0] == '/') {
117 sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name);
118
119 debugf("We open the real file '%s'\n", buffer);
120 return creat(buffer, mode);
121 }
122 return creat(name, mode);
123}
124
125int x11_remove(char *name)
126{
127 char buffer[256]; /* sufficiently big */
128
129 if(name[0] == '/') {
130 sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name);
131
132 debugf("We open the real file '%s'\n", buffer);
133 return remove(buffer);
134 }
135 return remove(name);
136}
137
112void fat_size(unsigned int* size, unsigned int* free) 138void fat_size(unsigned int* size, unsigned int* free)
113{ 139{
114 struct statfs fs; 140 struct statfs fs;