]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vconsole-setup: don't fail with an empty keymap
authorLuca Boccassi <bluca@debian.org>
Mon, 24 Jul 2023 14:31:02 +0000 (15:31 +0100)
committerLuca Boccassi <bluca@debian.org>
Mon, 24 Jul 2023 14:43:11 +0000 (15:43 +0100)
The new meson option 'default-keymap' means that by default there's always
a keymap to configure, so vconsole-setup fails. Allow to set
-Ddefault-keymap="" to disable it and skip gracefully again.

Follow-up for f129d0e77c4c9a0e12ae38cd241cd49846844a80

src/vconsole/vconsole-setup.c

index 1d5ee9ad4422ab0719142e3d857f441cc87eb454..d54764207e13234b8883e5f0dbd651f6c5a0add9 100644 (file)
@@ -280,7 +280,7 @@ static int keyboard_load_and_wait(const char *vc, Context *c, bool utf8) {
         map_toggle = context_get_config(c, VC_KEYMAP_TOGGLE);
 
         /* An empty map means kernel map */
-        if (!map)
+        if (isempty(map))
                 return 0;
 
         args[i++] = KBD_LOADKEYS;