summaryrefslogtreecommitdiffstats
path: root/firmware/export/rbpaths.h
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-11 08:26:53 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-11 17:47:34 -0400
commitdb6f21e2954db63cd04de73ed472c48f63b80a89 (patch)
tree252e2fccaef788141630ceeb67a03b69bd1654d1 /firmware/export/rbpaths.h
parenta5add3982bff6907d30942f614d5a471f75c018b (diff)
downloadrockbox-db6f21e2954db63cd04de73ed472c48f63b80a89.tar.gz
rockbox-db6f21e2954db63cd04de73ed472c48f63b80a89.tar.bz2
rockbox-db6f21e2954db63cd04de73ed472c48f63b80a89.zip
hosted: sanitize handling of HOME_DIR
* HOME_DIR is now either "/" or special "<HOME>" * target-specific "home dir path" is defined solely by PIVOT_ROOT * PIVOT_ROOT path is now defined in toplevel config files * Make Samsung YP-R0/R1 and SONY_NWZ use PIVOT_ROOT too * Do not prepend PIVOT_ROOT path if the path already has it! * Do not play these games for __PCTOOL__ builds Change-Id: I3d51ad902a5f9cafe45ba15ba654f30f1ec6113a
Diffstat (limited to 'firmware/export/rbpaths.h')
-rw-r--r--firmware/export/rbpaths.h27
1 files changed, 8 insertions, 19 deletions
diff --git a/firmware/export/rbpaths.h b/firmware/export/rbpaths.h
index 215b4c0c4b..da5a2fb71c 100644
--- a/firmware/export/rbpaths.h
+++ b/firmware/export/rbpaths.h
@@ -40,24 +40,12 @@
#define ROCKBOX_DIR_LEN (sizeof(ROCKBOX_DIR)-1)
#endif /* def __PCTOOL__ */
+/* NOTE: target-specific hosted HOME_DIR resides in filesystem-app.c */
#if !defined(APPLICATION) || defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) || \
defined(DX50) || defined(DX90) || defined(SONY_NWZ_LINUX) || \
defined(HIBY_LINUX) || defined(FIIO_M3K)
-#if defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1)
-#define HOME_DIR "/mnt/media0"
-#elif defined(SONY_NWZ_LINUX)
-#define HOME_DIR "/contents"
-#elif defined(DX50) || defined(DX90)
-/* Where to put save files like recordings, playlists, screen dumps ...*/
-#define HOME_DIR "/mnt/sdcard"
-#elif defined(HIBY_LINUX)
-#define HOME_DIR "/mnt/sd_0"
-#elif defined(FIIO_M3K)
-#define HOME_DIR "/mnt"
-#else
#define HOME_DIR "/"
-#endif
/* make sure both are the same for native builds */
#undef ROCKBOX_LIBRARY_PATH
@@ -69,6 +57,7 @@
#else /* APPLICATION */
#define HOME_DIR "<HOME>" /* replaced at runtime */
+#define HAVE_SPECIAL_DIRS
#define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks"
#if (CONFIG_PLATFORM & PLATFORM_ANDROID)
@@ -79,10 +68,8 @@
#endif /* !APPLICATION || SAMSUNG_YPR0 */
-#define HOME_DIR_LEN (sizeof(HOME_DIR)-1)
-
-#define REC_BASE_DIR "/Recordings"
-#define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists"
+#define REC_BASE_DIR HOME_DIR "/Recordings"
+#define PLAYLIST_CATALOG_DEFAULT_DIR HOME_DIR "/Playlists"
#define LANG_DIR ROCKBOX_DIR "/langs"
@@ -91,8 +78,10 @@
#define PLUGIN_DEMOS_DIR PLUGIN_DIR "/demos"
#define VIEWERS_DIR PLUGIN_DIR "/viewers"
-#if defined(APPLICATION) && !(defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) || \
- defined(DX50) || defined(DX90) || defined(SONY_NWZ_LINUX) || defined(HIBY_LINUX))
+#if defined(APPLICATION) && \
+ !(defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) || \
+ defined(DX50) || defined(DX90) || defined(SONY_NWZ_LINUX) || defined(HIBY_LINUX) || defined(FIIO_M3K))
+
#define PLUGIN_DATA_DIR ROCKBOX_DIR "/rocks.data"
#define PLUGIN_GAMES_DATA_DIR PLUGIN_DATA_DIR
#define PLUGIN_APPS_DATA_DIR PLUGIN_DATA_DIR