summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted/rolo.c
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/target/hosted/rolo.c
parenta5add3982bff6907d30942f614d5a471f75c018b (diff)
downloadrockbox-db6f21e295.tar.gz
rockbox-db6f21e295.tar.bz2
rockbox-db6f21e295.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/target/hosted/rolo.c')
-rw-r--r--firmware/target/hosted/rolo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/target/hosted/rolo.c b/firmware/target/hosted/rolo.c
index 432d69c86e..2aa3071c9a 100644
--- a/firmware/target/hosted/rolo.c
+++ b/firmware/target/hosted/rolo.c
@@ -91,8 +91,14 @@ int rolo_load(const char* filename)
lcd_remote_update();
#endif
+#ifdef PIVOT_ROOT
+#define EXECDIR PIVOT_ROOT
+#else
+#define EXECDIR ROOT_DIR
+#endif
+
char buf[256];
- snprintf(buf, sizeof(buf), "%s/%s", HOME_DIR, filename);
+ snprintf(buf, sizeof(buf), "%s/%s", EXECDIR, filename);
execl(buf, BOOTFILE, NULL);
rolo_error("Failed to launch!", strerror(errno));