summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-12-17 23:07:15 +0000
committerJeremy Katz <katzj@redhat.com>2002-12-17 23:07:15 +0000
commit5e3e87a67ddef9ba82f4e0fd4c2bd70fb4aa5d9f (patch)
tree81fd0722b36fe75c2cfc858892a2442bf93b5dc4 /isys
parent1c9a0ab4c85ab5d2f2820002dc82f9f1ac7ae047 (diff)
downloadanaconda-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
Diffstat (limited to 'isys')
-rw-r--r--isys/lang.c16
-rw-r--r--isys/lang.h1
2 files changed, 14 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