chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1a9ce3f
)
inhibit: print --list if no argument is given
author
Kay Sievers
<kay@vrfy.org>
Tue, 5 Mar 2013 18:32:36 +0000
(19:32 +0100)
committer
Kay Sievers
<kay@vrfy.org>
Tue, 5 Mar 2013 18:34:38 +0000
(19:34 +0100)
src/login/inhibit.c
patch
|
blob
|
history
diff --git
a/src/login/inhibit.c
b/src/login/inhibit.c
index 586582190e30557d8b068ceb80452e94f9f8cc2b..a812195cae5820bac43160313474d1c518d783f3 100644
(file)
--- 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;
}
log_error("Missing command line to execute.");
return -EINVAL;
}