diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2014-02-11 15:27:23 +0100 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2014-02-23 20:23:52 +0100 |
| commit | 0f928f87850153a38c7e6cfafd283ce4f52a0666 (patch) | |
| tree | 55bbb19b5a17cd6e30a29bb3c2446a6e4c02738a /firmware/include/dir_uncached.h | |
| parent | cbc57af0f3192093177d90861df72c4074566cf8 (diff) | |
| download | rockbox-0f928f87850153a38c7e6cfafd283ce4f52a0666.zip rockbox-0f928f87850153a38c7e6cfafd283ce4f52a0666.tar.gz rockbox-0f928f87850153a38c7e6cfafd283ce4f52a0666.tar.bz2 rockbox-0f928f87850153a38c7e6cfafd283ce4f52a0666.tar.xz | |
RaaA: Move directory related stuff from filesystem-unix.c into rbpaths.c.
Part of this change is to align sdlapp builds to other application targets
in that the sim_* wrappers are not used anymore (except for sim_read/write).
Path mangling is now done in rbpaths.c as well.
Change-Id: I9726da73b50a83d9e1a1840288de16ec01ea029d
Diffstat (limited to 'firmware/include/dir_uncached.h')
| -rw-r--r-- | firmware/include/dir_uncached.h | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/firmware/include/dir_uncached.h b/firmware/include/dir_uncached.h index 1f9b8c1..6443d5b 100644 --- a/firmware/include/dir_uncached.h +++ b/firmware/include/dir_uncached.h @@ -33,7 +33,7 @@ struct dirinfo { #include <stdbool.h> #include "file.h" -#if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA)) || defined(__PCTOOL__) +#if defined(SIMULATOR) || defined(__PCTOOL__) # define dirent_uncached sim_dirent # define DIR_UNCACHED SIM_DIR # define opendir_uncached sim_opendir @@ -41,10 +41,21 @@ struct dirinfo { # define closedir_uncached sim_closedir # define mkdir_uncached sim_mkdir # define rmdir_uncached sim_rmdir +#elif defined(APPLICATION) +# include "rbpaths.h" +# define DIRENT_DEFINED +# define DIR_DEFINED +# define dirent_uncached dirent +# define DIR_UNCACHED DIR +# define opendir_uncached app_opendir +# define readdir_uncached app_readdir +# define closedir_uncached app_closedir +# define mkdir_uncached app_mkdir +# define rmdir_uncached app_rmdir #endif -#ifndef DIRENT_DEFINED +#ifndef DIRENT_DEFINED struct dirent_uncached { unsigned char d_name[MAX_PATH]; struct dirinfo info; @@ -72,23 +83,6 @@ typedef struct { } DIR_UNCACHED CACHEALIGN_ATTR; #endif - -#if defined(APPLICATION) && !defined(__PCTOOL__) -#if (CONFIG_PLATFORM & PLATFORM_ANDROID) || defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) -#include "dir-target.h" -#endif -# undef opendir_uncached -# define opendir_uncached app_opendir -# undef mkdir_uncached -# define mkdir_uncached app_mkdir -# undef rmdir_uncached -# define rmdir_uncached app_rmdir -/* defined in rbpaths.c */ -extern DIR_UNCACHED* app_opendir(const char* name); -extern int app_rmdir(const char* name); -extern int app_mkdir(const char* name); -#endif - #ifdef HAVE_HOTSWAP char *get_volume_name(int volume); #endif |