mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 21:51:37 +00:00
inhibit: print --list if no argument is given
This commit is contained in:
+4
-1
@@ -230,7 +230,10 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
if (arg_action == ACTION_INHIBIT && optind >= argc) {
|
||||
if (arg_action == ACTION_INHIBIT && argc == 1)
|
||||
arg_action = ACTION_LIST;
|
||||
|
||||
else if (arg_action == ACTION_INHIBIT && optind >= argc) {
|
||||
log_error("Missing command line to execute.");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user