From: Kay Sievers Date: Tue, 5 Mar 2013 18:32:36 +0000 (+0100) Subject: inhibit: print --list if no argument is given X-Git-Tag: upstream/198~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f2343c6b15ec5495eb5032ae36b937fe36177cc;p=platform%2Fupstream%2Fsystemd.git inhibit: print --list if no argument is given --- diff --git a/src/login/inhibit.c b/src/login/inhibit.c index 5865821..a812195 100644 --- a/src/login/inhibit.c +++ b/src/login/inhibit.c @@ -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; }