mirror of
https://github.com/troglobit/finit.git
synced 2026-10-13 10:14:47 +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:
+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[])
|
||||
|
||||
Reference in New Issue
Block a user