summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/common/filefuncs.c2
-rw-r--r--firmware/export/filefuncs.h3
-rw-r--r--firmware/export/rbpaths.h4
-rw-r--r--firmware/include/file.h2
4 files changed, 3 insertions, 8 deletions
diff --git a/firmware/common/filefuncs.c b/firmware/common/filefuncs.c
index fd33f3c6f9..f969a011b7 100644
--- a/firmware/common/filefuncs.c
+++ b/firmware/common/filefuncs.c
@@ -55,6 +55,7 @@ int strip_volume(const char* name, char* namecopy)
55} 55}
56#endif /* #ifdef HAVE_MULTIVOLUME */ 56#endif /* #ifdef HAVE_MULTIVOLUME */
57 57
58#endif /* __PCTOOL__ */
58/* Test file existence, using dircache of possible */ 59/* Test file existence, using dircache of possible */
59bool file_exists(const char *file) 60bool file_exists(const char *file)
60{ 61{
@@ -89,7 +90,6 @@ bool dir_exists(const char *path)
89 return true; 90 return true;
90} 91}
91 92
92#endif /* __PCTOOL__ */
93 93
94#if (CONFIG_PLATFORM & (PLATFORM_NATIVE|PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA)) 94#if (CONFIG_PLATFORM & (PLATFORM_NATIVE|PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA))
95struct dirinfo dir_get_info(DIR* parent, struct dirent *entry) 95struct dirinfo dir_get_info(DIR* parent, struct dirent *entry)
diff --git a/firmware/export/filefuncs.h b/firmware/export/filefuncs.h
index 3d4e73ad9f..92e97f65b0 100644
--- a/firmware/export/filefuncs.h
+++ b/firmware/export/filefuncs.h
@@ -31,10 +31,9 @@
31int strip_volume(const char* name, char* namecopy); 31int strip_volume(const char* name, char* namecopy);
32#endif 32#endif
33 33
34#ifndef __PCTOOL__
35bool file_exists(const char *file); 34bool file_exists(const char *file);
36bool dir_exists(const char *path); 35bool dir_exists(const char *path);
37#endif 36
38extern struct dirinfo dir_get_info(DIR* parent, struct dirent *entry); 37extern struct dirinfo dir_get_info(DIR* parent, struct dirent *entry);
39 38
40#endif /* __INCLUDE_FILEFUNCS_H_ */ 39#endif /* __INCLUDE_FILEFUNCS_H_ */
diff --git a/firmware/export/rbpaths.h b/firmware/export/rbpaths.h
index c60ebdf2af..d50f66d72d 100644
--- a/firmware/export/rbpaths.h
+++ b/firmware/export/rbpaths.h
@@ -30,11 +30,7 @@
30/* name of directory where configuration, fonts and other data 30/* name of directory where configuration, fonts and other data
31 * files are stored */ 31 * files are stored */
32#ifdef __PCTOOL__ 32#ifdef __PCTOOL__
33#undef ROCKBOX_DIR
34#undef ROCKBOX_DIR_LEN
35#undef WPS_DIR 33#undef WPS_DIR
36#define ROCKBOX_DIR "."
37#define ROCKBOX_DIR_LEN 1
38#else 34#else
39 35
40/* ROCKBOX_DIR is now defined in autoconf.h for flexible build types */ 36/* ROCKBOX_DIR is now defined in autoconf.h for flexible build types */
diff --git a/firmware/include/file.h b/firmware/include/file.h
index 0ff94a8168..4ba9c503b4 100644
--- a/firmware/include/file.h
+++ b/firmware/include/file.h
@@ -54,7 +54,7 @@ extern int app_rename(const char* path, const char* newname);
54# define write(x,y,z) sim_write(x,y,z) 54# define write(x,y,z) sim_write(x,y,z)
55# define close(x) sim_close(x) 55# define close(x) sim_close(x)
56# endif 56# endif
57#elif defined(SIMULATOR) 57#elif defined(SIMULATOR) || defined(DBTOOL)
58# define open(x, ...) sim_open(x, __VA_ARGS__) 58# define open(x, ...) sim_open(x, __VA_ARGS__)
59# define creat(x,m) sim_creat(x,m) 59# define creat(x,m) sim_creat(x,m)
60# define remove(x) sim_remove(x) 60# define remove(x) sim_remove(x)