diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-11 08:26:53 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-11 17:47:34 -0400 |
commit | db6f21e2954db63cd04de73ed472c48f63b80a89 (patch) | |
tree | 252e2fccaef788141630ceeb67a03b69bd1654d1 /firmware/target/hosted/rolo.c | |
parent | a5add3982bff6907d30942f614d5a471f75c018b (diff) | |
download | rockbox-db6f21e2954db63cd04de73ed472c48f63b80a89.tar.gz 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/target/hosted/rolo.c')
-rw-r--r-- | firmware/target/hosted/rolo.c | 8 |
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) | |||
91 | lcd_remote_update(); | 91 | lcd_remote_update(); |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | #ifdef PIVOT_ROOT | ||
95 | #define EXECDIR PIVOT_ROOT | ||
96 | #else | ||
97 | #define EXECDIR ROOT_DIR | ||
98 | #endif | ||
99 | |||
94 | char buf[256]; | 100 | char buf[256]; |
95 | snprintf(buf, sizeof(buf), "%s/%s", HOME_DIR, filename); | 101 | snprintf(buf, sizeof(buf), "%s/%s", EXECDIR, filename); |
96 | execl(buf, BOOTFILE, NULL); | 102 | execl(buf, BOOTFILE, NULL); |
97 | 103 | ||
98 | rolo_error("Failed to launch!", strerror(errno)); | 104 | rolo_error("Failed to launch!", strerror(errno)); |