diff options
Diffstat (limited to 'src/vconsole/vconsole-setup.c')
-rw-r--r-- | src/vconsole/vconsole-setup.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index e79ad2a5f0..40e4b22b99 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -122,10 +122,9 @@ static int keymap_load(const char *vc, const char *map, const char *map_toggle, args[i++] = NULL; pid = fork(); - if (pid < 0) { - log_error_errno(errno, "Failed to fork: %m"); - return -errno; - } else if (pid == 0) { + if (pid < 0) + return log_error_errno(errno, "Failed to fork: %m"); + else if (pid == 0) { execv(args[0], (char **) args); _exit(EXIT_FAILURE); } @@ -160,10 +159,9 @@ static int font_load(const char *vc, const char *font, const char *map, const ch args[i++] = NULL; pid = fork(); - if (pid < 0) { - log_error_errno(errno, "Failed to fork: %m"); - return -errno; - } else if (pid == 0) { + if (pid < 0) + return log_error_errno(errno, "Failed to fork: %m"); + else if (pid == 0) { execv(args[0], (char **) args); _exit(EXIT_FAILURE); } |