[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] fix loadkeys on serial console



Hello,

when running anaconda (kickstart) over a serial linedisplay (two line
output device) loadkeys does not function. The output of anaconda is
writing to /dev/console, which is achieved by kernel parameter
"console=ttyS1". If user input is needed (ks.cfg-%pre) the layout of the
keyboard does not match the settings in ks.cfg. Obviously the loadkeys
of anaconda does not function correctly if the output is a serial port.
This patch fixes this by not using /dev/console, but /dev/tty0 (the
master-tty).

The same problem might occur with to isys/lang.c:isysSetUnicodeKeymap().

This patch is tested on anaconda-10.x with different output devices
(serial/cmdline, TUI and GUI).

Regards,
Niels
diff --git a/isys/lang.c b/isys/lang.c
index e16bf3a..715f5e1 100644
--- a/isys/lang.c
+++ b/isys/lang.c
@@ -129,7 +129,7 @@ int loadKeymap(gzFile stream) {
     if (gunzip_read(stream, keymaps, sizeof(keymaps)) != sizeof(keymaps))
 	return -EINVAL;
 
-    console = open("/dev/console", O_RDWR);
+    console = open("/dev/tty0", O_RDWR);
     if (console < 0)
 	return -EACCES;
 

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]