From: Zbigniew Jędrzejewski-Szmek Date: Thu, 25 May 2017 03:25:10 +0000 (-0400) Subject: vconsole-setup: add more log messages X-Git-Tag: v234~164^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d62378088593a7868d58b840ef5ca25dd357339;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index 36d04d49c10..3e8d1c2a518 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");