summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-12-06 22:26:31 +0000
committerThomas Martitz <kugel@rockbox.org>2010-12-06 22:26:31 +0000
commit2c2416094f426972c9e2e96d25058311bbe82f97 (patch)
tree449b4e12e01c3c5c4afa2ae6a8cd396df82b5a38 /firmware/target/hosted
parentc35b43b0f54bd607d38908544446caaa02f148a3 (diff)
downloadrockbox-2c2416094f426972c9e2e96d25058311bbe82f97.tar.gz
rockbox-2c2416094f426972c9e2e96d25058311bbe82f97.tar.bz2
rockbox-2c2416094f426972c9e2e96d25058311bbe82f97.zip
Get rid of get_user_file_path and do the path handling in wrappers for open() and friends.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/hosted')
-rw-r--r--firmware/target/hosted/android/dir-target.h21
-rw-r--r--firmware/target/hosted/android/fs-android.c1
2 files changed, 18 insertions, 4 deletions
diff --git a/firmware/target/hosted/android/dir-target.h b/firmware/target/hosted/android/dir-target.h
index c93d92caad..c6c6b4b2b0 100644
--- a/firmware/target/hosted/android/dir-target.h
+++ b/firmware/target/hosted/android/dir-target.h
@@ -24,10 +24,21 @@
#include <dirent.h>
-#define opendir _opendir
-#define mkdir _mkdir
-#define closedir _closedir
-#define readdir _readdir
+#define dirent_uncached dirent
+#define DIR_UNCACHED DIR
+#define opendir_uncached _opendir
+#define readdir_uncached _readdir
+#define closedir_uncached _closedir
+#define mkdir_uncached _mkdir
+#define rmdir_uncached rmdir
+
+#define dirent_android dirent
+#define DIR_android DIR
+#define opendir_android _opendir
+#define readdir_android _readdir
+#define closedir_android _closedir
+#define mkdir_android _mkdir
+#define rmdir_android rmdir
extern DIR* _opendir(const char* name);
extern int _mkdir(const char* name);
@@ -36,5 +47,7 @@ extern struct dirent *_readdir(DIR* dir);
extern void fat_size(unsigned long *size, unsigned long *free);
#define DIRFUNCTIONS_DEFINED
+#define DIRENT_DEFINED
+#define DIR_DEFINED
#endif /* __DIR_TARGET_H__ */
diff --git a/firmware/target/hosted/android/fs-android.c b/firmware/target/hosted/android/fs-android.c
index 5209458e54..1967198d3d 100644
--- a/firmware/target/hosted/android/fs-android.c
+++ b/firmware/target/hosted/android/fs-android.c
@@ -29,6 +29,7 @@
#include "dir-target.h"
#include "file.h"
#include "dir.h"
+#include "rbpaths.h"
long filesize(int fd)