summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-07-31 10:33:27 +0200
committerThomas Martitz <kugel@rockbox.org>2012-07-31 10:33:27 +0200
commitefe73e143ad8997a791b895c9ee21a68b6570429 (patch)
treed206dd97632286975a271ea1502f35b56165767f /firmware
parentb358bcfc25272cb03dc95809c0c82688943f0f84 (diff)
downloadrockbox-efe73e143ad8997a791b895c9ee21a68b6570429.zip
rockbox-efe73e143ad8997a791b895c9ee21a68b6570429.tar.gz
rockbox-efe73e143ad8997a791b895c9ee21a68b6570429.tar.bz2
rockbox-efe73e143ad8997a791b895c9ee21a68b6570429.tar.xz
Fix database tool.
It was also broken functionally, probably since a while.So restore the functionality. Run it on the dap, the tcd files will be placed into .rockbox folder. Change-Id: Id7a6ce4389dfaf99799258902be80d630af0601c
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 fd33f3c..f969a01 100644
--- a/firmware/common/filefuncs.c
+++ b/firmware/common/filefuncs.c
@@ -55,6 +55,7 @@ int strip_volume(const char* name, char* namecopy)
}
#endif /* #ifdef HAVE_MULTIVOLUME */
+#endif /* __PCTOOL__ */
/* Test file existence, using dircache of possible */
bool file_exists(const char *file)
{
@@ -89,7 +90,6 @@ bool dir_exists(const char *path)
return true;
}
-#endif /* __PCTOOL__ */
#if (CONFIG_PLATFORM & (PLATFORM_NATIVE|PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA))
struct dirinfo dir_get_info(DIR* parent, struct dirent *entry)
diff --git a/firmware/export/filefuncs.h b/firmware/export/filefuncs.h
index 3d4e73a..92e97f6 100644
--- a/firmware/export/filefuncs.h
+++ b/firmware/export/filefuncs.h
@@ -31,10 +31,9 @@
int strip_volume(const char* name, char* namecopy);
#endif
-#ifndef __PCTOOL__
bool file_exists(const char *file);
bool dir_exists(const char *path);
-#endif
+
extern struct dirinfo dir_get_info(DIR* parent, struct dirent *entry);
#endif /* __INCLUDE_FILEFUNCS_H_ */
diff --git a/firmware/export/rbpaths.h b/firmware/export/rbpaths.h
index c60ebdf..d50f66d 100644
--- a/firmware/export/rbpaths.h
+++ b/firmware/export/rbpaths.h
@@ -30,11 +30,7 @@
/* name of directory where configuration, fonts and other data
* files are stored */
#ifdef __PCTOOL__
-#undef ROCKBOX_DIR
-#undef ROCKBOX_DIR_LEN
#undef WPS_DIR
-#define ROCKBOX_DIR "."
-#define ROCKBOX_DIR_LEN 1
#else
/* 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 0ff94a8..4ba9c50 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);
# define write(x,y,z) sim_write(x,y,z)
# define close(x) sim_close(x)
# endif
-#elif defined(SIMULATOR)
+#elif defined(SIMULATOR) || defined(DBTOOL)
# define open(x, ...) sim_open(x, __VA_ARGS__)
# define creat(x,m) sim_creat(x,m)
# define remove(x) sim_remove(x)