chiark / gitweb /
utils: show help blurb when run without any arguments
[elogind.git] / src / notify.c
index 6dd708a..514636e 100644 (file)
@@ -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;
 }
 
         return 1;
 }