summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-04-16 09:24:38 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-04-16 09:24:38 +0000
commit8fa821dd8cb0ba5e60463fbbf8d3c6b753dfdaf7 (patch)
treeb3e41b98d78d50825d0697d439b1d91b416a5af3 /uisimulator
parenta67df23a7d4a18e171f642412e54e15d7289d679 (diff)
downloadrockbox-8fa821dd8cb0ba5e60463fbbf8d3c6b753dfdaf7.tar.gz
rockbox-8fa821dd8cb0ba5e60463fbbf8d3c6b753dfdaf7.tar.bz2
rockbox-8fa821dd8cb0ba5e60463fbbf8d3c6b753dfdaf7.zip
Added rmdir() for the x11 simulator
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4511 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/x11/dir.h1
-rw-r--r--uisimulator/x11/io.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/uisimulator/x11/dir.h b/uisimulator/x11/dir.h
index 17058eafb2..b0eec77eb3 100644
--- a/uisimulator/x11/dir.h
+++ b/uisimulator/x11/dir.h
@@ -42,6 +42,7 @@ extern int x11_mkdir(char *name, int mode);
#define readdir(x) x11_readdir(x)
#define closedir(x) x11_closedir(x)
#define mkdir(x, y) x11_mkdir(x, y)
+#define rmdir(x) x11_rmdir(x)
#endif
diff --git a/uisimulator/x11/io.c b/uisimulator/x11/io.c
index 72a7319ec6..faccc826a7 100644
--- a/uisimulator/x11/io.c
+++ b/uisimulator/x11/io.c
@@ -146,6 +146,18 @@ int x11_mkdir(const char *name, mode_t mode)
return (mkdir)(name, 0666);
}
+int x11_rmdir(const char *name)
+{
+ char buffer[256]; /* sufficiently big */
+ if(name[0] == '/') {
+ sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name);
+
+ debugf("We remove the real directory '%s'\n", buffer);
+ return (rmdir)(buffer);
+ }
+ return (rmdir)(name);
+}
+
int x11_remove(char *name)
{
char buffer[256]; /* sufficiently big */