projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a70c72a
)
main: let's move the arg_show_status check into status_welcome()
author
Lennart Poettering
<lennart@poettering.net>
Fri, 15 Dec 2017 16:00:35 +0000
(17:00 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 15 Dec 2017 19:52:28 +0000
(20:52 +0100)
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
patch
|
blob
|
history
diff --git
a/src/core/main.c
b/src/core/main.c
index
27a4ebc
..
af76f75
100644
(file)
--- 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();