Re: [kbd] kbd: loadkeys -d doesn't work

Jaroslav Skarvada <[email protected]>
Newsgroups dev.linux.lists.kbd
Message-ID <b4ac641f-87d0-440c-9509-13da9129c169@zmail07.collab.prod.int.phx2.redhat.com>
----- Original Message -----
> 10.10.2011 11:48, Jaroslav Skarvada wrote:
> > The loadkeys -d doesn't work any more (kbd-1.15.3).
> > According to man and previous behaviour, I think it
> > should work. Possible fix is attached
> 
> I fixed this bug in my git. Sorry for long delay.
> Can you confirm fix ?
> 
I think it shouldn't read stdin in case of optd

Jaroslav


diff -up kbd-1.15.3/src/loadkeys.c.orig kbd-1.15.3/src/loadkeys.c
--- kbd-1.15.3/src/loadkeys.c.orig      2011-10-21 16:42:09.304296233 +0200
+++ kbd-1.15.3/src/loadkeys.c   2011-10-21 16:41:01.595072657 +0200
@@ -3021,7 +3021,7 @@ int main(int argc, char *argv[])
                parse_keymap(f);
        }

-       if (optind == argc) {
+       if (!optd && optind == argc) {
                strcpy(pathname, "<stdin>");
                parse_keymap(stdin);
        }
diff -up kbd-1.15.3/src/loadkeys.y.orig kbd-1.15.3/src/loadkeys.y
--- kbd-1.15.3/src/loadkeys.y.orig      2011-10-21 12:16:39.000000000 +0200
+++ kbd-1.15.3/src/loadkeys.y   2011-10-21 16:42:41.192924078 +0200
@@ -1210,7 +1210,7 @@ int main(int argc, char *argv[])
                parse_keymap(f);
        }

-       if (optind == argc) {
+       if (!optd && optind == argc) {
                strcpy(pathname, "<stdin>");
                parse_keymap(stdin);
        }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.