Added rmdir() for the x11 simulator

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4511 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2004-04-16 09:24:38 +00:00
parent a67df23a7d
commit 8fa821dd8c
2 changed files with 13 additions and 0 deletions

View file

@ -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

View file

@ -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 */