chiark / gitweb /
clients: add missing command line arguments
[elogind.git] / src / libsystemd-bus / busctl.c
index 92072b247b62d3d51fb26de35aae7e2b47fcd077..088111cbce10648f0fa9dc73d8f3d6e80139d47f 100644 (file)
@@ -183,14 +183,14 @@ static int help(void) {
                "Introspect the bus.\n\n"
                "  -h --help               Show this help\n"
                "     --version            Show package version\n"
+               "     --no-pager           Do not pipe output into a pager\n"
                "     --system             Connect to system bus\n"
                "     --user               Connect to user bus\n"
                "  -H --host=[USER@]HOST   Operate on remote host\n"
                "  -M --machine=CONTAINER  Operate on local container\n"
                "     --address=ADDRESS    Connect to bus specified by address\n"
                "     --no-unique          Only show well-known names\n"
-               "     --match=MATCH        Only show matching messages\n"
-               "     --no-pager           Do not pipe output into a pager\n\n"
+               "     --match=MATCH        Only show matching messages\n\n"
                "Commands:\n"
                "  list                    List bus names\n"
                "  monitor [SERVICE...]    Show bus traffic\n",
@@ -220,7 +220,9 @@ static int parse_argv(int argc, char *argv[]) {
                 { "address",   required_argument, NULL, ARG_ADDRESS   },
                 { "no-unique", no_argument,       NULL, ARG_NO_UNIQUE },
                 { "match",     required_argument, NULL, ARG_MATCH     },
-                { NULL,        0,                 NULL, 0             },
+                { "host",      required_argument, NULL, 'H'           },
+                { "machine",   required_argument, NULL, 'M'           },
+                {},
         };
 
         int c;
@@ -279,8 +281,7 @@ static int parse_argv(int argc, char *argv[]) {
                         return -EINVAL;
 
                 default:
-                        log_error("Unknown option code %c", c);
-                        return -EINVAL;
+                        assert_not_reached("Unhandled option");
                 }
         }