]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journalct: do no allow --this-boot to take arguments
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 28 Jun 2016 19:39:56 +0000 (15:39 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 28 Jun 2016 20:14:04 +0000 (16:14 -0400)
Before --this-boot was deprecated in a331b5e6d47243, it did not take
any arguments.

src/journal/journalctl.c

index ac55e68b90c49df2899da8b33ead18093e975b55..043c6d9630c3b6371c9982ca618dbe19299fadcc 100644 (file)
@@ -348,6 +348,7 @@ static int parse_argv(int argc, char *argv[]) {
                 ARG_NO_FULL,
                 ARG_NO_TAIL,
                 ARG_NEW_ID128,
+                ARG_THIS_BOOT,
                 ARG_LIST_BOOTS,
                 ARG_USER,
                 ARG_SYSTEM,
@@ -392,9 +393,9 @@ static int parse_argv(int argc, char *argv[]) {
                 { "new-id128",      no_argument,       NULL, ARG_NEW_ID128      },
                 { "quiet",          no_argument,       NULL, 'q'                },
                 { "merge",          no_argument,       NULL, 'm'                },
+                { "this-boot",      no_argument,       NULL, ARG_THIS_BOOT      }, /* deprecated */
                 { "boot",           optional_argument, NULL, 'b'                },
                 { "list-boots",     no_argument,       NULL, ARG_LIST_BOOTS     },
-                { "this-boot",      optional_argument, NULL, 'b'                }, /* deprecated */
                 { "dmesg",          no_argument,       NULL, 'k'                },
                 { "system",         no_argument,       NULL, ARG_SYSTEM         },
                 { "user",           no_argument,       NULL, ARG_USER           },
@@ -544,6 +545,10 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_merge = true;
                         break;
 
+                case ARG_THIS_BOOT:
+                        arg_boot = true;
+                        break;
+
                 case 'b':
                         arg_boot = true;