summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--isys/lang.c16
-rw-r--r--isys/lang.h1
-rw-r--r--loader2/loader.c1
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) {