[kbd] [PATCH] [loadkeys] Don't open console on --bkeymap
Olivier Mehani
shtrom at ssji.net
Sun Apr 25 07:12:08 UTC 2010
From: Olivier Mehani <olivier.mehani at nicta.com.au>
Check that -b hasn't specified, similarly to -m, before loadkeys tries to open
the console. As for --mktable, --bkeymap doesn't need it. This allows to dump
binary keymaps in a larger range of situations where ownership of the console
device is not guarranteed e.g., when running from an Xterm.
Signed-off-by: Olivier Mehani <olivier.mehani at nicta.com.au>
---
src/loadkeys.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/loadkeys.c b/src/loadkeys.c
index a827f8e..a610722 100644
--- a/src/loadkeys.c
+++ b/src/loadkeys.c
@@ -2090,7 +2090,7 @@ main(int argc, char *argv[]) {
}
prefer_unicode = optu;
- if (!optm) {
+ if (!optm && !optb) {
/* check whether the keyboard is in Unicode mode */
fd = getfd(NULL);
if (ioctl(fd, KDGKBMODE, &kbd_mode)) {
--
1.7.0.5
More information about the kbd
mailing list