Bug#341596: [PATCH] loadkeys -m shouldn't need console.
This bug really started to annoy me when I couldn't cross-compile ARM
kernels as a batch job...
The problem is the unicode patch, 430_read_keymaps_fmt.patch
which unconditionally tries to work out if the current console is in
unicode mode. Appended is a patch that makes this conditional on not
-m.
diff -Nru ./console-tools-0.2.3/kbdtools/loadkeys.y ../build-tree.new/console-tools-0.2.3/kbdtools/loadkeys.y
--- ./console-tools-0.2.3/kbdtools/loadkeys.y 2006-03-29 15:24:20.000000000 +1100
+++ ../build-tree.new/console-tools-0.2.3/kbdtools/loadkeys.y 2006-03-29 15:23:42.000000000 +1100
@@ -408,17 +408,18 @@
}
}
- fd = get_console_fd(NULL);
- if (!optu) {
- if (ioctl(fd, KDGKBMODE, &mode)) {
- perror("KDGKBMODE");
- fprintf(stderr, _("loadkeys: error reading keyboard mode\n"));
- exit(1);
- }
- if (mode == K_UNICODE)
- set_charset("unicode");
- }
-
+ if (!optm) {
+ fd = get_console_fd(NULL);
+ if (!optu) {
+ if (ioctl(fd, KDGKBMODE, &mode)) {
+ perror("KDGKBMODE");
+ fprintf(stderr, _("loadkeys: error reading keyboard mode\n"));
+ exit(1);
+ }
+ if (mode == K_UNICODE)
+ set_charset("unicode");
+ }
+ }
args = argv + optind - 1;
/* set up the first input file, if any */
yywrap();
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia
Reply to: