mirror of
https://github.com/troglobit/finit.git
synced 2026-11-17 19:30:29 +00:00
initctl: don't fall back to default command for wrong commands
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
e8b942cf95
commit
2385a1209b
1 file changed
+4
-1
+4
-1
@@ -942,7 +942,10 @@ static int cmd_parse(int argc, char *argv[], struct cmd *command)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return command[0].cb(NULL); /* default cmd */
|
if (argv[0] && strlen(argv[0]) > 0)
|
||||||
|
errx(1, "No such command. See 'initctl help' for an overview of available commands.");
|
||||||
|
|
||||||
|
return command[0].cb(NULL); /* default cmd */
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
|||||||
Reference in new issue
Block a user