chiark / gitweb /
nspawn: properly unset arg_link_journal_try, when --link-journal= is specified
authorLennart Poettering <lennart@poettering.net>
Fri, 12 Dec 2014 15:58:30 +0000 (16:58 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 12 Dec 2014 16:30:25 +0000 (17:30 +0100)
src/nspawn/nspawn.c

index 1bfc99d5fcaa37129fcd6e85304caa54e8fa959c..8082166ee205f102e77404ce5ae4e93b9452cf1e 100644 (file)
@@ -477,15 +477,19 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 case ARG_LINK_JOURNAL:
                         break;
 
                 case ARG_LINK_JOURNAL:
-                        if (streq(optarg, "auto"))
+                        if (streq(optarg, "auto")) {
                                 arg_link_journal = LINK_AUTO;
                                 arg_link_journal = LINK_AUTO;
-                        else if (streq(optarg, "no"))
+                                arg_link_journal_try = false;
+                        } else if (streq(optarg, "no")) {
                                 arg_link_journal = LINK_NO;
                                 arg_link_journal = LINK_NO;
-                        else if (streq(optarg, "guest"))
+                                arg_link_journal_try = false;
+                        } else if (streq(optarg, "guest")) {
                                 arg_link_journal = LINK_GUEST;
                                 arg_link_journal = LINK_GUEST;
-                        else if (streq(optarg, "host"))
+                                arg_link_journal_try = false;
+                        } else if (streq(optarg, "host")) {
                                 arg_link_journal = LINK_HOST;
                                 arg_link_journal = LINK_HOST;
-                        else if (streq(optarg, "try-guest")) {
+                                arg_link_journal_try = false;
+                        } else if (streq(optarg, "try-guest")) {
                                 arg_link_journal = LINK_GUEST;
                                 arg_link_journal_try = true;
                         } else if (streq(optarg, "try-host")) {
                                 arg_link_journal = LINK_GUEST;
                                 arg_link_journal_try = true;
                         } else if (streq(optarg, "try-host")) {