summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uisimulator/x11/io.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/uisimulator/x11/io.c b/uisimulator/x11/io.c
index 4c1e594..9551d10 100644
--- a/uisimulator/x11/io.c
+++ b/uisimulator/x11/io.c
@@ -13,3 +13,16 @@ DIR *x11_opendir(char *name)
}
return opendir(name);
}
+
+int x11_open(char *name, int opts)
+{
+ char buffer[256]; /* sufficiently big */
+
+ if(name[0] == '/') {
+ sprintf(buffer, "%s/%s", SIMULATOR_ARCHOS_ROOT, name);
+
+ Logf("We open the real file '%s'", buffer);
+ return open(buffer, opts);
+ }
+ return open(name, opts);
+}