forked from pool/systemd
.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=930
This commit is contained in:
parent
fd0af547e5
commit
0818947a2b
@ -134,7 +134,7 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
"COMPOSETABLE", &vc_compose_table,
|
||||
NULL);
|
||||
if (r < 0 && r != -ENOENT)
|
||||
@@ -421,6 +428,32 @@ int main(int argc, char **argv) {
|
||||
@@ -421,6 +428,35 @@ int main(int argc, char **argv) {
|
||||
|
||||
disable_capslock = vc_kbd_disable_caps_lock &&
|
||||
strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0;
|
||||
@ -146,28 +146,31 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
+
|
||||
+ fdmem = open ("/dev/mem", O_RDONLY);
|
||||
+ if (fdmem < 0) {
|
||||
+ log_error("Failed to open /dev/mem: %m");
|
||||
+ return EXIT_FAILURE;
|
||||
+ log_warning_errno(errno, "Failed to open /dev/mem: %m");
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
+ if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1) {
|
||||
+ log_error("Failed to seek /dev/mem: %m");
|
||||
+ return EXIT_FAILURE;
|
||||
+ log_warning_errno(errno, "Failed to seek /dev/mem: %m");
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
+ if (read(fdmem, &c, sizeof(char)) == -1) {
|
||||
+ log_error("Failed to read /dev/mem: %m");
|
||||
+ return EXIT_FAILURE;
|
||||
+ log_warning_errno(errno, "Failed to read /dev/mem: %m");
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
+ if (c & BDA_KSF4_NUMLOCK_MASK)
|
||||
+ numlock = true;
|
||||
+ finish:
|
||||
+ if (fdmem >= 0)
|
||||
+ close(fdmem);
|
||||
+ }
|
||||
+#endif /* x86 */
|
||||
#endif /* HAVE_SYSV_COMPAT */
|
||||
|
||||
r = parse_env_file("/etc/vconsole.conf", NEWLINE,
|
||||
@@ -456,6 +489,10 @@ int main(int argc, char **argv) {
|
||||
@@ -456,6 +492,10 @@ int main(int argc, char **argv) {
|
||||
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, disable_capslock) > 0;
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 10 08:01:57 UTC 2016 - werner@suse.de
|
||||
|
||||
- Modify patch handle-numlock-value-in-etc-sysconfig-keyboard.patch
|
||||
to allow that open, seek, and read of /dev/mem may fail e.g.
|
||||
on XEN based virtual guests (bsc#961120)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 1 09:16:08 UTC 2016 - werner@suse.de
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 10 08:01:57 UTC 2016 - werner@suse.de
|
||||
|
||||
- Modify patch handle-numlock-value-in-etc-sysconfig-keyboard.patch
|
||||
to allow that open, seek, and read of /dev/mem may fail e.g.
|
||||
on XEN based virtual guests (bsc#961120)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 1 09:16:08 UTC 2016 - werner@suse.de
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user