[systemd-commits] src/login
Kay Sievers
kay at kemper.freedesktop.org
Tue Mar 5 10:34:54 PST 2013
src/login/inhibit.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 2f2343c6b15ec5495eb5032ae36b937fe36177cc
Author: Kay Sievers <kay at vrfy.org>
Date: Tue Mar 5 19:32:36 2013 +0100
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;
}
More information about the systemd-commits
mailing list