* [kbd] [PATCH] [loadkeys] Don't open console on --bkeymap
@ 2010-04-25 7:12 Olivier Mehani
2010-04-25 9:57 ` Alexey Gladkov
0 siblings, 1 reply; 2+ messages in thread
From: Olivier Mehani @ 2010-04-25 7:12 UTC (permalink / raw)
To: kbd; +Cc: Olivier Mehani
From: Olivier Mehani <olivier.mehani@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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [kbd] [PATCH] [loadkeys] Don't open console on --bkeymap
2010-04-25 7:12 [kbd] [PATCH] [loadkeys] Don't open console on --bkeymap Olivier Mehani
@ 2010-04-25 9:57 ` Alexey Gladkov
0 siblings, 0 replies; 2+ messages in thread
From: Alexey Gladkov @ 2010-04-25 9:57 UTC (permalink / raw)
To: kbd
25.04.2010 11:12, Olivier Mehani wrote:
> From: Olivier Mehani <olivier.mehani@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@nicta.com.au>
> ---
> src/loadkeys.c | 2 +-
You must change the loadkeys.y too.
I applied with this change. Thanks!
--
Rgrds, legion
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-25 9:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-25 7:12 [kbd] [PATCH] [loadkeys] Don't open console on --bkeymap Olivier Mehani
2010-04-25 9:57 ` Alexey Gladkov
Linux console tools development discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/kbd/0 kbd/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 kbd kbd/ http://lore.altlinux.org/kbd \
kbd@lists.altlinux.org kbd@lists.altlinux.ru kbd@lists.altlinux.com
public-inbox-index kbd
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.kbd
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git