diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-12-17 23:07:15 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-12-17 23:07:15 +0000 |
commit | 5e3e87a67ddef9ba82f4e0fd4c2bd70fb4aa5d9f (patch) | |
tree | 81fd0722b36fe75c2cfc858892a2442bf93b5dc4 | |
parent | 1c9a0ab4c85ab5d2f2820002dc82f9f1ac7ae047 (diff) | |
download | anaconda-5e3e87a67ddef9ba82f4e0fd4c2bd70fb4aa5d9f.tar.gz anaconda-5e3e87a67ddef9ba82f4e0fd4c2bd70fb4aa5d9f.tar.xz anaconda-5e3e87a67ddef9ba82f4e0fd4c2bd70fb4aa5d9f.zip |
only set the unicode keymap up once. if we do it while X is running,
Bad Things (tm) happen
-rw-r--r-- | isys/lang.c | 16 | ||||
-rw-r--r-- | isys/lang.h | 1 | ||||
-rw-r--r-- | loader2/loader.c | 1 |
3 files changed, 15 insertions, 3 deletions
diff --git a/isys/lang.c b/isys/lang.c index 3f95ca0af..7b00d6dde 100644 --- a/isys/lang.c +++ b/isys/lang.c @@ -52,6 +52,19 @@ int isysLoadFont(void) { return 0; } +int isysSetUnicodeKeymap(void) { + int console; + + console = open("/dev/console", O_RDWR); + if (console < 0) + return -EACCES; + + /* place keyboard in unicode mode */ + ioctl(console, KDSKBMODE, K_UNICODE); + close(console); + return 0; +} + /* the file pointer must be at the beginning of the section already! */ int loadKeymap(gzFile stream) { int console; @@ -74,9 +87,6 @@ int loadKeymap(gzFile stream) { if (console < 0) return -EACCES; - /* place keyboard in unicode mode */ - ioctl(console, KDSKBMODE, K_UNICODE); - for (kmap = 0; kmap < MAX_NR_KEYMAPS; kmap++) { if (!keymaps[kmap]) continue; diff --git a/isys/lang.h b/isys/lang.h index f73183a74..55e5769a1 100644 --- a/isys/lang.h +++ b/isys/lang.h @@ -20,5 +20,6 @@ struct kmapInfo { int loadKeymap(gzFile stream); int isysLoadFont(void); int isysLoadKeymap(char * keymap); +int isysSetUnicodeKeymap(void); #endif diff --git a/loader2/loader.c b/loader2/loader.c index f4869e497..ddcb72d02 100644 --- a/loader2/loader.c +++ b/loader2/loader.c @@ -190,6 +190,7 @@ void initializeConsole(moduleList modLoaded, moduleDeps modDeps, printf("\033%%G"); fflush(stdout); isysLoadFont(); + isysSetUnicodeKeymap(); } static void spawnShell(int flags) { |