From fd8c85c6524ca64832dae0a187796a1ee56c253f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 15 Dec 2017 17:00:35 +0100 Subject: [PATCH] main: let's move the arg_show_status check into status_welcome() It's kinda nice to hide this check inside of status_welcome() itself, so that it handles all this on its own. --- src/core/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/main.c b/src/core/main.c index 27a4ebc..af76f75 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1338,6 +1338,9 @@ static int status_welcome(void) { _cleanup_free_ char *pretty_name = NULL, *ansi_color = NULL; int r; + if (arg_show_status <= 0) + return 0; + r = parse_env_file("/etc/os-release", NEWLINE, "PRETTY_NAME", &pretty_name, "ANSI_COLOR", &ansi_color, @@ -1915,9 +1918,7 @@ static int initialize_runtime( */ if (arg_system && !skip_setup) { - if (arg_show_status > 0) - status_welcome(); - + status_welcome(); hostname_setup(); machine_id_setup(NULL, arg_machine_id, NULL); loopback_setup(); -- 2.7.4