]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: move arg_show_status fix-up into load_configuration()
authorLennart Poettering <lennart@poettering.net>
Fri, 15 Dec 2017 16:16:24 +0000 (17:16 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 15 Dec 2017 19:52:28 +0000 (20:52 +0100)
It's part of finalizing our runtime parameters, hence let's move this
into load_configuration() after we loaded everything else. This is safe,
since we don't use it between the location where it was and where we
place it now yet.

src/core/main.c

index 06fe37263180835eb3567f4802e5193d43180f79..6d440cc13fe5aea56f216765f1b149fd62f7ad99 100644 (file)
@@ -2095,6 +2095,10 @@ static int load_configuration(int argc, char **argv, const char **ret_error_mess
                 }
         }
 
+        /* Initialize the show status setting if it hasn't been set explicitly yet */
+        if (arg_show_status == _SHOW_STATUS_UNSET)
+                arg_show_status = SHOW_STATUS_YES;
+
         return 0;
 }
 
@@ -2463,9 +2467,6 @@ int main(int argc, char *argv[]) {
                 log_open();
         }
 
-        if (arg_show_status == _SHOW_STATUS_UNSET)
-                arg_show_status = SHOW_STATUS_YES;
-
         /* Make sure we leave a core dump without panicing the
          * kernel. */
         if (getpid_cached() == 1) {