diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-05-24 23:25:10 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-05-24 23:25:10 -0400 |
commit | 3d62378088593a7868d58b840ef5ca25dd357339 (patch) | |
tree | f91ecbe8d0fedb4c838c22ea2e3fbf0526207acd /src/vconsole | |
parent | b23aec0d6b98bc99998786506a8769e1a1ea1841 (diff) | |
download | systemd-3d62378088593a7868d58b840ef5ca25dd357339.tar.gz |
vconsole-setup: add more log messages
This makes it quite a bit easier to see what failed.
strv_join is called inline in log_debug so that it is under the conditional
that kills the whole thing if debugging is disabled.
Diffstat (limited to 'src/vconsole')
-rw-r--r-- | src/vconsole/vconsole-setup.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index 36d04d49c1..3e8d1c2a51 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -41,6 +41,7 @@ #include "signal-util.h" #include "stdio-util.h" #include "string-util.h" +#include "strv.h" #include "terminal-util.h" #include "util.h" #include "virt.h" @@ -121,6 +122,7 @@ static int toggle_utf8_sysfs(bool utf8) { } static int keyboard_load_and_wait(const char *vc, const char *map, const char *map_toggle, bool utf8) { + _cleanup_free_ char *cmd = NULL; const char *args[8]; int i = 0; pid_t pid; @@ -140,6 +142,9 @@ static int keyboard_load_and_wait(const char *vc, const char *map, const char *m args[i++] = map_toggle; args[i++] = NULL; + log_debug("Executing \"%s\"...", + strnull((cmd = strv_join((char**) args, " ")))); + pid = fork(); if (pid < 0) return log_error_errno(errno, "Failed to fork: %m"); @@ -156,6 +161,7 @@ static int keyboard_load_and_wait(const char *vc, const char *map, const char *m } static int font_load_and_wait(const char *vc, const char *font, const char *map, const char *unimap) { + _cleanup_free_ char *cmd = NULL; const char *args[9]; int i = 0; pid_t pid; @@ -179,6 +185,9 @@ static int font_load_and_wait(const char *vc, const char *font, const char *map, args[i++] = font; args[i++] = NULL; + log_debug("Executing \"%s\"...", + strnull((cmd = strv_join((char**) args, " ")))); + pid = fork(); if (pid < 0) return log_error_errno(errno, "Failed to fork: %m"); |