2015-09-27 14:32:31 +02:00
|
|
|
Original-From: Frederic Crozat <fcrozat@suse.com>
|
|
|
|
Original-Date: Fri, 19 Aug 2011 15:29:49 +0000
|
2013-04-23 11:39:56 +02:00
|
|
|
Subject: handle disable_caplock and compose_table and kbd_rate
|
2015-09-27 14:32:31 +02:00
|
|
|
References: https://bugzilla.opensuse.org/746595
|
|
|
|
Last-Editor: Jan Engelhardt <jengelh@inai.de>
|
|
|
|
Date: Fri Jun 19 21:36:27 CEST 2015
|
2011-08-25 10:07:26 +02:00
|
|
|
|
|
|
|
---
|
2015-09-27 14:32:31 +02:00
|
|
|
src/vconsole/vconsole-setup.c | 151 ++++++++++++++++++++++++++++++++++++++++--
|
|
|
|
1 file changed, 147 insertions(+), 4 deletions(-)
|
2011-08-25 10:07:26 +02:00
|
|
|
|
2015-12-23 12:01:38 +01:00
|
|
|
Index: systemd-228/src/vconsole/vconsole-setup.c
|
Accepting request 242359 from Base:System
- Disable blkrrpart for SLES12 and below
- Add upstream patch
1054-udev-exclude-MD-from-block-device-ownership-event-lo.patch
- Add with condition blkrrpart to be able to disable the patches
1025, 1027, 1029, 1030, 1031, 1032, 1033, 1034, 1037, and 1054
which uses the BLKRRPART ioctl for e.g. synthesize change events
which may interfere with other tools like parted.
- Update
handle-disable_caplock-and-compose_table-and-kbd_rate.patch,
handle-numlock-value-in-etc-sysconfig-keyboard.patch: read
/etc/vconsole.conf after /etc/sysconfig/(keyboard,console)
otherwise empty value in /etc/sysconfig/keyboard might override
/etc/vconsole.conf values.
- Update :
0001-journal-compress-return-early-in-uncompress_startswi.patch
0002-util-don-t-consider-tabs-special-in-string_has_cc-an.patch
0002-vconsole-setup-run-setfont-before-loadkeys.patch
0003-core-never-consider-failure-when-reading-drop-ins-fa.patch
0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch
apply-ACL-for-nvidia-device-nodes.patch
keep-crypt-password-prompt.patch
log-target-null-instead-kmsg.patch
parse-crypttab-for-noauto-option.patch
set-and-use-default-logconsole.patch: fix all warnings in code
- Remove 0001-compress-fix-return-value.patch: not relevant to
systemd v210 code.
- Also change udev-generate-peristent-rule to udev-generate-persistent-rule
OBS-URL: https://build.opensuse.org/request/show/242359
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=195
2014-07-26 12:19:44 +02:00
|
|
|
===================================================================
|
2015-12-23 12:01:38 +01:00
|
|
|
--- systemd-228.orig/src/vconsole/vconsole-setup.c
|
|
|
|
+++ systemd-228/src/vconsole/vconsole-setup.c
|
|
|
|
@@ -34,6 +34,8 @@
|
|
|
|
#include "alloc-util.h"
|
|
|
|
#include "fd-util.h"
|
2013-04-23 11:39:56 +02:00
|
|
|
#include "fileio.h"
|
2015-09-27 14:32:31 +02:00
|
|
|
+#include "macro.h"
|
2011-08-25 10:07:26 +02:00
|
|
|
+#include "strv.h"
|
2015-12-23 12:01:38 +01:00
|
|
|
#include "io-util.h"
|
|
|
|
#include "locale-util.h"
|
|
|
|
#include "log.h"
|
|
|
|
@@ -104,8 +106,10 @@ static int enable_utf8(int fd) {
|
2011-08-25 10:07:26 +02:00
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
2015-09-27 14:32:31 +02:00
|
|
|
-static int keyboard_load_and_wait(const char *vc, const char *map, const char *map_toggle, bool utf8) {
|
2011-08-25 10:07:26 +02:00
|
|
|
- const char *args[8];
|
2015-09-27 14:32:31 +02:00
|
|
|
+static int keyboard_load_and_wait(const char *vc, const char *map,
|
|
|
|
+ const char *map_toggle, bool utf8, bool disable_capslock)
|
|
|
|
+{
|
2011-08-29 09:14:27 +02:00
|
|
|
+ const char *args[9];
|
2015-09-27 14:32:31 +02:00
|
|
|
int i = 0, r;
|
2011-08-25 10:07:26 +02:00
|
|
|
pid_t pid;
|
|
|
|
|
2015-12-23 12:01:38 +01:00
|
|
|
@@ -122,6 +126,8 @@ static int keyboard_load_and_wait(const
|
2011-08-25 10:07:26 +02:00
|
|
|
args[i++] = map;
|
|
|
|
if (map_toggle)
|
|
|
|
args[i++] = map_toggle;
|
|
|
|
+ if (disable_capslock)
|
|
|
|
+ args[i++] = "disable.capslock";
|
|
|
|
args[i++] = NULL;
|
|
|
|
|
2012-11-02 17:30:32 +01:00
|
|
|
pid = fork();
|
2015-12-23 12:01:38 +01:00
|
|
|
@@ -251,11 +257,117 @@ static void font_copy_to_all_vcs(int fd)
|
2013-04-23 11:39:56 +02:00
|
|
|
}
|
2011-08-25 10:07:26 +02:00
|
|
|
}
|
|
|
|
|
2013-04-23 11:39:56 +02:00
|
|
|
+#ifdef HAVE_SYSV_COMPAT
|
2015-09-27 14:32:31 +02:00
|
|
|
+static int compose_load_and_wait(const char *vc, const char *compose_table)
|
|
|
|
+{
|
2011-08-29 09:14:27 +02:00
|
|
|
+ const char *args[1024];
|
2015-09-27 14:32:31 +02:00
|
|
|
+ unsigned int i = 0, j = 0;
|
|
|
|
+ int ret;
|
2011-08-29 09:14:27 +02:00
|
|
|
+ pid_t pid;
|
|
|
|
+ char **strv_compose_table = NULL;
|
2011-12-12 16:59:25 +01:00
|
|
|
+ char *to_free[1024];
|
2011-08-29 09:14:27 +02:00
|
|
|
+
|
2015-09-27 14:32:31 +02:00
|
|
|
+ if (isempty(compose_table))
|
|
|
|
+ /* An empty map means no compose table */
|
|
|
|
+ return 1;
|
2011-08-29 09:14:27 +02:00
|
|
|
+
|
|
|
|
+ args[i++] = KBD_LOADKEYS;
|
|
|
|
+ args[i++] = "-q";
|
|
|
|
+ args[i++] = "-C";
|
|
|
|
+ args[i++] = vc;
|
|
|
|
+
|
|
|
|
+ strv_compose_table = strv_split(compose_table, WHITESPACE);
|
|
|
|
+ if (strv_compose_table) {
|
|
|
|
+ bool compose_loaded = false;
|
|
|
|
+ bool compose_clear = false;
|
|
|
|
+ char **name;
|
|
|
|
+ char *arg;
|
|
|
|
+
|
2015-09-27 14:32:31 +02:00
|
|
|
+ STRV_FOREACH(name, strv_compose_table) {
|
|
|
|
+ if (streq(*name, "-c") || streq(*name, "clear")) {
|
2011-08-29 09:14:27 +02:00
|
|
|
+ compose_clear = true;
|
|
|
|
+ continue;
|
|
|
|
+ }
|
2015-09-27 14:32:31 +02:00
|
|
|
+ if (!compose_loaded && compose_clear)
|
|
|
|
+ args[i++] = "-c";
|
|
|
|
+ asprintf(&arg, "compose.%s", *name);
|
2011-08-29 09:14:27 +02:00
|
|
|
+ compose_loaded = true;
|
2011-12-12 16:59:25 +01:00
|
|
|
+ args[i++] = to_free[j++] = arg;
|
2015-09-27 14:32:31 +02:00
|
|
|
+ if (i >= ELEMENTSOF(args) - 1)
|
|
|
|
+ break;
|
2011-08-29 09:14:27 +02:00
|
|
|
+ }
|
|
|
|
+ strv_free(strv_compose_table);
|
|
|
|
+ }
|
|
|
|
+ args[i++] = NULL;
|
|
|
|
+
|
2015-09-27 14:32:31 +02:00
|
|
|
+ pid = fork();
|
|
|
|
+ if (pid < 0)
|
|
|
|
+ return log_error_errno(errno, "Failed to fork: %m");
|
|
|
|
+ if (pid == 0) {
|
|
|
|
+ reset_all_signal_handlers();
|
|
|
|
+ reset_signal_mask();
|
2011-08-29 09:14:27 +02:00
|
|
|
+ execv(args[0], (char **) args);
|
|
|
|
+ _exit(EXIT_FAILURE);
|
|
|
|
+ }
|
|
|
|
+
|
2015-09-27 14:32:31 +02:00
|
|
|
+ ret = wait_for_terminate_and_warn(args[0], pid, true);
|
|
|
|
+ for (i = 0; i < j; ++i)
|
|
|
|
+ free(to_free[i]);
|
|
|
|
+ if (ret < 0)
|
|
|
|
+ return ret;
|
|
|
|
+ return ret == 0;
|
2011-08-29 09:14:27 +02:00
|
|
|
+}
|
2013-04-23 11:39:56 +02:00
|
|
|
+#endif
|
2011-08-29 09:14:27 +02:00
|
|
|
+
|
2015-09-27 14:32:31 +02:00
|
|
|
+static int kbdrate_set_and_wait(const char *vc, const char *kbd_rate,
|
|
|
|
+ const char *kbd_delay)
|
|
|
|
+{
|
2011-08-25 10:07:26 +02:00
|
|
|
+ const char *args[7];
|
2015-09-27 14:32:31 +02:00
|
|
|
+ int i = 0, ret;
|
2011-08-25 10:07:26 +02:00
|
|
|
+ pid_t pid;
|
|
|
|
+
|
2015-09-27 14:32:31 +02:00
|
|
|
+ if (isempty(kbd_rate) && isempty(kbd_delay))
|
|
|
|
+ return 1;
|
2011-08-25 10:07:26 +02:00
|
|
|
+
|
|
|
|
+ args[i++] = "/bin/kbdrate";
|
|
|
|
+ if (!isempty(kbd_rate)) {
|
|
|
|
+ args[i++] = "-r";
|
|
|
|
+ args[i++] = kbd_rate;
|
|
|
|
+ }
|
|
|
|
+ if (!isempty(kbd_delay)) {
|
|
|
|
+ args[i++] = "-d";
|
|
|
|
+ args[i++] = kbd_delay;
|
|
|
|
+ }
|
|
|
|
+ args[i++] = "-s";
|
|
|
|
+ args[i++] = NULL;
|
|
|
|
+
|
2015-09-27 14:32:31 +02:00
|
|
|
+ pid = fork();
|
|
|
|
+ if (pid < 0)
|
|
|
|
+ return log_error_errno(errno, "Failed to fork: %m");
|
|
|
|
+ if (pid == 0) {
|
|
|
|
+ reset_all_signal_handlers();
|
|
|
|
+ reset_signal_mask();
|
2011-08-25 10:07:26 +02:00
|
|
|
+ execv(args[0], (char **) args);
|
|
|
|
+ _exit(EXIT_FAILURE);
|
|
|
|
+ }
|
2015-09-27 14:32:31 +02:00
|
|
|
+ ret = wait_for_terminate_and_warn(args[0], pid, true);
|
|
|
|
+ if (ret < 0)
|
|
|
|
+ return ret;
|
|
|
|
+ return ret == 0;
|
2011-08-25 10:07:26 +02:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
const char *vc;
|
2015-03-27 09:39:40 +01:00
|
|
|
_cleanup_free_ char
|
|
|
|
*vc_keymap = NULL, *vc_keymap_toggle = NULL,
|
|
|
|
*vc_font = NULL, *vc_font_map = NULL, *vc_font_unimap = NULL;
|
2013-04-23 11:39:56 +02:00
|
|
|
+#ifdef HAVE_SYSV_COMPAT
|
2015-03-27 09:39:40 +01:00
|
|
|
+ _cleanup_free_ char
|
|
|
|
+ *vc_kbd_delay = NULL, *vc_kbd_rate = NULL,
|
|
|
|
+ *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL;
|
2011-08-25 10:07:26 +02:00
|
|
|
+#endif
|
2015-03-09 09:20:20 +01:00
|
|
|
+ bool disable_capslock = false;
|
2015-09-27 14:32:31 +02:00
|
|
|
+ bool comp_ok, rate_ok;
|
2015-03-27 09:39:40 +01:00
|
|
|
_cleanup_close_ int fd = -1;
|
2015-09-27 14:32:31 +02:00
|
|
|
bool utf8, font_copy = false, font_ok, keyboard_ok;
|
|
|
|
int r = EXIT_FAILURE;
|
2015-12-23 12:01:38 +01:00
|
|
|
@@ -286,6 +398,31 @@ int main(int argc, char **argv) {
|
Accepting request 242359 from Base:System
- Disable blkrrpart for SLES12 and below
- Add upstream patch
1054-udev-exclude-MD-from-block-device-ownership-event-lo.patch
- Add with condition blkrrpart to be able to disable the patches
1025, 1027, 1029, 1030, 1031, 1032, 1033, 1034, 1037, and 1054
which uses the BLKRRPART ioctl for e.g. synthesize change events
which may interfere with other tools like parted.
- Update
handle-disable_caplock-and-compose_table-and-kbd_rate.patch,
handle-numlock-value-in-etc-sysconfig-keyboard.patch: read
/etc/vconsole.conf after /etc/sysconfig/(keyboard,console)
otherwise empty value in /etc/sysconfig/keyboard might override
/etc/vconsole.conf values.
- Update :
0001-journal-compress-return-early-in-uncompress_startswi.patch
0002-util-don-t-consider-tabs-special-in-string_has_cc-an.patch
0002-vconsole-setup-run-setfont-before-loadkeys.patch
0003-core-never-consider-failure-when-reading-drop-ins-fa.patch
0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch
apply-ACL-for-nvidia-device-nodes.patch
keep-crypt-password-prompt.patch
log-target-null-instead-kmsg.patch
parse-crypttab-for-noauto-option.patch
set-and-use-default-logconsole.patch: fix all warnings in code
- Remove 0001-compress-fix-return-value.patch: not relevant to
systemd v210 code.
- Also change udev-generate-peristent-rule to udev-generate-persistent-rule
OBS-URL: https://build.opensuse.org/request/show/242359
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=195
2014-07-26 12:19:44 +02:00
|
|
|
|
|
|
|
utf8 = is_locale_utf8();
|
2011-08-25 10:07:26 +02:00
|
|
|
|
2013-04-23 11:39:56 +02:00
|
|
|
+#ifdef HAVE_SYSV_COMPAT
|
Accepting request 242359 from Base:System
- Disable blkrrpart for SLES12 and below
- Add upstream patch
1054-udev-exclude-MD-from-block-device-ownership-event-lo.patch
- Add with condition blkrrpart to be able to disable the patches
1025, 1027, 1029, 1030, 1031, 1032, 1033, 1034, 1037, and 1054
which uses the BLKRRPART ioctl for e.g. synthesize change events
which may interfere with other tools like parted.
- Update
handle-disable_caplock-and-compose_table-and-kbd_rate.patch,
handle-numlock-value-in-etc-sysconfig-keyboard.patch: read
/etc/vconsole.conf after /etc/sysconfig/(keyboard,console)
otherwise empty value in /etc/sysconfig/keyboard might override
/etc/vconsole.conf values.
- Update :
0001-journal-compress-return-early-in-uncompress_startswi.patch
0002-util-don-t-consider-tabs-special-in-string_has_cc-an.patch
0002-vconsole-setup-run-setfont-before-loadkeys.patch
0003-core-never-consider-failure-when-reading-drop-ins-fa.patch
0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch
apply-ACL-for-nvidia-device-nodes.patch
keep-crypt-password-prompt.patch
log-target-null-instead-kmsg.patch
parse-crypttab-for-noauto-option.patch
set-and-use-default-logconsole.patch: fix all warnings in code
- Remove 0001-compress-fix-return-value.patch: not relevant to
systemd v210 code.
- Also change udev-generate-peristent-rule to udev-generate-persistent-rule
OBS-URL: https://build.opensuse.org/request/show/242359
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=195
2014-07-26 12:19:44 +02:00
|
|
|
+ r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE,
|
|
|
|
+ "KEYTABLE", &vc_keymap,
|
|
|
|
+ "KBD_DELAY", &vc_kbd_delay,
|
|
|
|
+ "KBD_RATE", &vc_kbd_rate,
|
|
|
|
+ "KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock,
|
|
|
|
+ "COMPOSETABLE", &vc_compose_table,
|
|
|
|
+ NULL);
|
|
|
|
+ if (r < 0 && r != -ENOENT)
|
2015-09-27 14:32:31 +02:00
|
|
|
+ log_warning("Failed to read /etc/sysconfig/keyboard: %s",
|
|
|
|
+ strerror(-r));
|
Accepting request 242359 from Base:System
- Disable blkrrpart for SLES12 and below
- Add upstream patch
1054-udev-exclude-MD-from-block-device-ownership-event-lo.patch
- Add with condition blkrrpart to be able to disable the patches
1025, 1027, 1029, 1030, 1031, 1032, 1033, 1034, 1037, and 1054
which uses the BLKRRPART ioctl for e.g. synthesize change events
which may interfere with other tools like parted.
- Update
handle-disable_caplock-and-compose_table-and-kbd_rate.patch,
handle-numlock-value-in-etc-sysconfig-keyboard.patch: read
/etc/vconsole.conf after /etc/sysconfig/(keyboard,console)
otherwise empty value in /etc/sysconfig/keyboard might override
/etc/vconsole.conf values.
- Update :
0001-journal-compress-return-early-in-uncompress_startswi.patch
0002-util-don-t-consider-tabs-special-in-string_has_cc-an.patch
0002-vconsole-setup-run-setfont-before-loadkeys.patch
0003-core-never-consider-failure-when-reading-drop-ins-fa.patch
0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch
apply-ACL-for-nvidia-device-nodes.patch
keep-crypt-password-prompt.patch
log-target-null-instead-kmsg.patch
parse-crypttab-for-noauto-option.patch
set-and-use-default-logconsole.patch: fix all warnings in code
- Remove 0001-compress-fix-return-value.patch: not relevant to
systemd v210 code.
- Also change udev-generate-peristent-rule to udev-generate-persistent-rule
OBS-URL: https://build.opensuse.org/request/show/242359
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=195
2014-07-26 12:19:44 +02:00
|
|
|
+
|
|
|
|
+ r = parse_env_file("/etc/sysconfig/console", NEWLINE,
|
|
|
|
+ "CONSOLE_FONT", &vc_font,
|
|
|
|
+ "CONSOLE_SCREENMAP", &vc_font_map,
|
|
|
|
+ "CONSOLE_UNICODEMAP", &vc_font_unimap,
|
|
|
|
+ NULL);
|
|
|
|
+ if (r < 0 && r != -ENOENT)
|
2015-09-27 14:32:31 +02:00
|
|
|
+ log_warning("Failed to read /etc/sysconfig/console: %s",
|
|
|
|
+ strerror(-r));
|
Accepting request 242359 from Base:System
- Disable blkrrpart for SLES12 and below
- Add upstream patch
1054-udev-exclude-MD-from-block-device-ownership-event-lo.patch
- Add with condition blkrrpart to be able to disable the patches
1025, 1027, 1029, 1030, 1031, 1032, 1033, 1034, 1037, and 1054
which uses the BLKRRPART ioctl for e.g. synthesize change events
which may interfere with other tools like parted.
- Update
handle-disable_caplock-and-compose_table-and-kbd_rate.patch,
handle-numlock-value-in-etc-sysconfig-keyboard.patch: read
/etc/vconsole.conf after /etc/sysconfig/(keyboard,console)
otherwise empty value in /etc/sysconfig/keyboard might override
/etc/vconsole.conf values.
- Update :
0001-journal-compress-return-early-in-uncompress_startswi.patch
0002-util-don-t-consider-tabs-special-in-string_has_cc-an.patch
0002-vconsole-setup-run-setfont-before-loadkeys.patch
0003-core-never-consider-failure-when-reading-drop-ins-fa.patch
0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch
apply-ACL-for-nvidia-device-nodes.patch
keep-crypt-password-prompt.patch
log-target-null-instead-kmsg.patch
parse-crypttab-for-noauto-option.patch
set-and-use-default-logconsole.patch: fix all warnings in code
- Remove 0001-compress-fix-return-value.patch: not relevant to
systemd v210 code.
- Also change udev-generate-peristent-rule to udev-generate-persistent-rule
OBS-URL: https://build.opensuse.org/request/show/242359
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=195
2014-07-26 12:19:44 +02:00
|
|
|
+
|
2015-09-27 14:32:31 +02:00
|
|
|
+ disable_capslock = vc_kbd_disable_caps_lock &&
|
|
|
|
+ strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0;
|
|
|
|
+#endif /* HAVE_SYSV_COMPAT */
|
2013-04-23 11:39:56 +02:00
|
|
|
+
|
Accepting request 242359 from Base:System
- Disable blkrrpart for SLES12 and below
- Add upstream patch
1054-udev-exclude-MD-from-block-device-ownership-event-lo.patch
- Add with condition blkrrpart to be able to disable the patches
1025, 1027, 1029, 1030, 1031, 1032, 1033, 1034, 1037, and 1054
which uses the BLKRRPART ioctl for e.g. synthesize change events
which may interfere with other tools like parted.
- Update
handle-disable_caplock-and-compose_table-and-kbd_rate.patch,
handle-numlock-value-in-etc-sysconfig-keyboard.patch: read
/etc/vconsole.conf after /etc/sysconfig/(keyboard,console)
otherwise empty value in /etc/sysconfig/keyboard might override
/etc/vconsole.conf values.
- Update :
0001-journal-compress-return-early-in-uncompress_startswi.patch
0002-util-don-t-consider-tabs-special-in-string_has_cc-an.patch
0002-vconsole-setup-run-setfont-before-loadkeys.patch
0003-core-never-consider-failure-when-reading-drop-ins-fa.patch
0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch
apply-ACL-for-nvidia-device-nodes.patch
keep-crypt-password-prompt.patch
log-target-null-instead-kmsg.patch
parse-crypttab-for-noauto-option.patch
set-and-use-default-logconsole.patch: fix all warnings in code
- Remove 0001-compress-fix-return-value.patch: not relevant to
systemd v210 code.
- Also change udev-generate-peristent-rule to udev-generate-persistent-rule
OBS-URL: https://build.opensuse.org/request/show/242359
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=195
2014-07-26 12:19:44 +02:00
|
|
|
r = parse_env_file("/etc/vconsole.conf", NEWLINE,
|
|
|
|
"KEYMAP", &vc_keymap,
|
|
|
|
"KEYMAP_TOGGLE", &vc_keymap_toggle,
|
2015-12-23 12:01:38 +01:00
|
|
|
@@ -317,11 +454,17 @@ int main(int argc, char **argv) {
|
2015-09-27 14:32:31 +02:00
|
|
|
(void) disable_utf8(fd);
|
2011-08-25 10:07:26 +02:00
|
|
|
|
2015-09-27 14:32:31 +02:00
|
|
|
font_ok = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap) > 0;
|
|
|
|
- keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle, utf8) > 0;
|
|
|
|
+ keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle,
|
|
|
|
+ utf8, disable_capslock) > 0;
|
2013-04-23 11:39:56 +02:00
|
|
|
+#ifdef HAVE_SYSV_COMPAT
|
2015-09-27 14:32:31 +02:00
|
|
|
+ comp_ok = compose_load_and_wait(vc, vc_compose_table);
|
|
|
|
+ rate_ok = kbdrate_set_and_wait(vc, vc_kbd_rate, vc_kbd_delay);
|
2011-08-25 10:07:26 +02:00
|
|
|
+#endif
|
|
|
|
|
2015-09-27 14:32:31 +02:00
|
|
|
/* Only copy the font when we executed setfont successfully */
|
|
|
|
if (font_copy && font_ok)
|
|
|
|
(void) font_copy_to_all_vcs(fd);
|
2011-12-12 16:59:25 +01:00
|
|
|
|
2015-09-27 14:32:31 +02:00
|
|
|
- return font_ok && keyboard_ok ? EXIT_SUCCESS : EXIT_FAILURE;
|
|
|
|
+ return font_ok && keyboard_ok && comp_ok && rate_ok ?
|
|
|
|
+ EXIT_SUCCESS : EXIT_FAILURE;
|
|
|
|
}
|