forked from pool/systemd
.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=936
This commit is contained in:
parent
1cf5a078c2
commit
8e0a3dcdb4
@ -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,35 @@ int main(int argc, char **argv) {
|
||||
@@ -421,6 +428,30 @@ int main(int argc, char **argv) {
|
||||
|
||||
disable_capslock = vc_kbd_disable_caps_lock &&
|
||||
strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0;
|
||||
@ -144,33 +144,28 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
+ int _cleanup_close_ fdmem;
|
||||
+ char c;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ fdmem = open ("/dev/mem", O_RDONLY);
|
||||
+ if (fdmem < 0) {
|
||||
+ log_warning_errno(errno, "Failed to open /dev/mem: %m");
|
||||
+ if (fdmem < 0)
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
+ if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1) {
|
||||
+ log_warning_errno(errno, "Failed to seek /dev/mem: %m");
|
||||
+ if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1)
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
+ if (read(fdmem, &c, sizeof(char)) == -1) {
|
||||
+ log_warning_errno(errno, "Failed to read /dev/mem: %m");
|
||||
+ if (read(fdmem, &c, sizeof(char)) == -1)
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
+ if (c & BDA_KSF4_NUMLOCK_MASK)
|
||||
+ numlock = true;
|
||||
+ finish:
|
||||
+ if (fdmem >= 0)
|
||||
+ close(fdmem);
|
||||
+ if (errno)
|
||||
+ log_warning_errno(errno, "Failed to read /dev/mem: %m");
|
||||
+ }
|
||||
+#endif /* x86 */
|
||||
#endif /* HAVE_SYSV_COMPAT */
|
||||
|
||||
r = parse_env_file("/etc/vconsole.conf", NEWLINE,
|
||||
@@ -456,6 +492,10 @@ int main(int argc, char **argv) {
|
||||
@@ -456,6 +487,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,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 5 07:08:39 UTC 2016 - werner@suse.de
|
||||
|
||||
- Fix patch patch handle-numlock-value-in-etc-sysconfig-keyboard.patch
|
||||
that is do not close a file descriptor twice (boo#973907)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 26 15:59:36 UTC 2016 - jengelh@inai.de
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user