mirror of
https://github.com/troglobit/finit.git
synced 2026-11-25 20:28:23 +00:00
Gracefully handle leading 'boot/' in command line conditions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
4d2b97e4cc
commit
4150fdfe59
1 file changed
+4
-1
+4
-1
@@ -85,7 +85,10 @@ static void cond_boot_strap(void)
|
|||||||
while (ptr) {
|
while (ptr) {
|
||||||
char cond[strlen(ptr) + 6];
|
char cond[strlen(ptr) + 6];
|
||||||
|
|
||||||
snprintf(cond, sizeof(cond), "boot/%s", ptr);
|
if (strncmp(ptr, "boot/", 5))
|
||||||
|
snprintf(cond, sizeof(cond), "boot/%s", ptr);
|
||||||
|
else
|
||||||
|
snprintf(cond, sizeof(cond), "%s", ptr);
|
||||||
cond_set_oneshot_noupdate(cond);
|
cond_set_oneshot_noupdate(cond);
|
||||||
|
|
||||||
ptr = strtok(NULL, ",");
|
ptr = strtok(NULL, ",");
|
||||||
|
|||||||
Reference in new issue
Block a user