chiark / gitweb /
cgls,loginctl,systemctl: fix -l
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 19 Jun 2013 22:08:14 +0000 (18:08 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 19 Jun 2013 22:08:14 +0000 (18:08 -0400)
Fixup for 98a6e13 "journalctl,loginctl,systemctl,systemd-cgls: add -l
as alias for --full".

src/cgls/cgls.c
src/login/loginctl.c
src/systemctl/systemctl.c

index f232731..155c5cc 100644 (file)
@@ -77,7 +77,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 1);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hkaM:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hkalM:", options, NULL)) >= 0) {
 
                 switch (c) {
 
index 087e52d..1b9723f 100644 (file)
@@ -1346,13 +1346,13 @@ static int parse_argv(int argc, char *argv[]) {
                 { "version",         no_argument,       NULL, ARG_VERSION         },
                 { "property",        required_argument, NULL, 'p'                 },
                 { "all",             no_argument,       NULL, 'a'                 },
+                { "full",            no_argument,       NULL, 'l'                 },
                 { "no-pager",        no_argument,       NULL, ARG_NO_PAGER        },
                 { "kill-who",        required_argument, NULL, ARG_KILL_WHO        },
                 { "signal",          required_argument, NULL, 's'                 },
                 { "host",            required_argument, NULL, 'H'                 },
                 { "privileged",      no_argument,       NULL, 'P'                 },
                 { "no-ask-password", no_argument,       NULL, ARG_NO_ASK_PASSWORD },
-                { "full",            no_argument,       NULL, 'l'                 },
                 { NULL,              0,                 NULL, 0                   }
         };
 
@@ -1361,7 +1361,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hp:as:H:P", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hp:als:H:P", options, NULL)) >= 0) {
 
                 switch (c) {
 
@@ -1395,6 +1395,10 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_all = true;
                         break;
 
+                case 'l':
+                        arg_full = true;
+                        break;
+
                 case ARG_NO_PAGER:
                         arg_no_pager = true;
                         break;
@@ -1424,10 +1428,6 @@ static int parse_argv(int argc, char *argv[]) {
                         parse_user_at_host(optarg, &arg_user, &arg_host);
                         break;
 
-                case 'l':
-                        arg_full = true;
-                        break;
-
                 case '?':
                         return -EINVAL;
 
index 8d496ab..53033ba 100644 (file)
@@ -4872,7 +4872,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "ht:p:aqfs:H:Pn:o:i", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "ht:p:alqfs:H:Pn:o:i", options, NULL)) >= 0) {
 
                 switch (c) {