summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2023-05-25 16:03:33 -0400
committerSolomon Peachy <pizza@shaftnet.org>2023-05-25 16:05:59 -0400
commit8bc7ba5d221f8bb20ec94854609b9d32ecd8816e (patch)
tree01feefcf0e4c43b153349339b34e29a911178cda
parente803daae0a1c42dbee0417d883a1944c65916cce (diff)
downloadrockbox-8bc7ba5d22.tar.gz
rockbox-8bc7ba5d22.zip
dbtool: More fixes to dbtool operation
Now properly treats current directory as "/" Change-Id: I54357a65f2fda7d2cfb56ff18a044ae10b87bbce
-rw-r--r--firmware/target/hosted/filesystem-app.c6
-rwxr-xr-xtools/configure2
-rw-r--r--tools/database/database.c35
3 files changed, 8 insertions, 35 deletions
diff --git a/firmware/target/hosted/filesystem-app.c b/firmware/target/hosted/filesystem-app.c
index 9c2ff8c99b..cfe4e65fe9 100644
--- a/firmware/target/hosted/filesystem-app.c
+++ b/firmware/target/hosted/filesystem-app.c
@@ -43,6 +43,10 @@
#undef PIVOT_ROOT
#endif
+#if defined(DBTOOL)
+#define PIVOT_ROOT "."
+#endif
+
#if defined(__PCTOOL__)
/* We don't want this for tools */
#undef HAVE_SPECIAL_DIRS
@@ -222,7 +226,7 @@ const char * handle_special_dirs(const char *dir, unsigned flags,
#define PIVOT_ROOT_LEN (sizeof(PIVOT_ROOT)-1)
/* Prepend root prefix to find actual path */
if (strncmp(PIVOT_ROOT, dir, PIVOT_ROOT_LEN)
-#ifdef MULTIDRIVE_DIR
+#if defined(MULTIDRIVE_DIR) && defined(MULTIDRIVE_DIR_LEN)
/* Unless it's a MULTIDRIVE dir, in which case use as-is */
&& strncmp(MULTIDRIVE_DIR, dir, MULTIDRIVE_DIR_LEN)
#endif
diff --git a/tools/configure b/tools/configure
index 64b238bb6d..1f758a967d 100755
--- a/tools/configure
+++ b/tools/configure
@@ -4270,7 +4270,7 @@ fi
simcc "database-sdl"
toolset='';
appsdir='$(ROOTDIR)/tools/database';
- rbdir="./.rockbox"
+
case $uname in
CYGWIN*|MINGW*)
output="database_${modelname}.exe"
diff --git a/tools/database/database.c b/tools/database/database.c
index 713d379c41..6eab245f65 100644
--- a/tools/database/database.c
+++ b/tools/database/database.c
@@ -23,41 +23,10 @@ int main(int argc, char **argv)
/* / is actually ., will get translated in io.c
* (with the help of sim_root_dir below */
- const char *paths[] = { "./", NULL };
+ const char *paths[] = { "/", NULL };
tagcache_init();
do_tagcache_build(paths);
tagcache_reverse_scan();
-
+
return 0;
}
-
-/* needed for io.c */
-const char *sim_root_dir = ".";
-
-/* stubs to avoid including thread-sdl.c */
-#include "kernel.h"
-void mutex_init(struct mutex *m)
-{
- (void)m;
-}
-
-void mutex_lock(struct mutex *m)
-{
- (void)m;
-}
-
-void mutex_unlock(struct mutex *m)
-{
- (void)m;
-}
-
-void sim_thread_lock(void *me)
-{
- (void)me;
-}
-
-void * sim_thread_unlock(void)
-{
- return (void*)1;
-}
-