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:
parent
a67df23a7d
commit
8fa821dd8c
2 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue