summaryrefslogtreecommitdiff
path: root/src/notify.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-24 04:55:57 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-24 04:55:57 +0200
commit2f02ce4005075ac76742ed6a2189cc2e5fc6a192 (patch)
tree4914f66cfadda43b628cde730ddd6a836cff4d25 /src/notify.c
parent6f6083dc73c4bdd48678456fa6b969d6f1152373 (diff)
utils: show help blurb when run without any arguments
Diffstat (limited to 'src/notify.c')
-rw-r--r--src/notify.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/notify.c b/src/notify.c
index 6dd708a900..514636e472 100644
--- a/src/notify.c
+++ b/src/notify.c
@@ -115,6 +115,15 @@ static int parse_argv(int argc, char *argv[]) {
}
}
+ if (optind >= argc &&
+ !arg_ready &&
+ !arg_status &&
+ !arg_pid &&
+ !arg_booted) {
+ help();
+ return -EINVAL;
+ }
+
return 1;
}