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

Jaroslav Skarvada <[email protected]>
Newsgroups dev.linux.lists.kbd
Message-ID <d6c36c03-81db-44da-88cc-bb16393aaad8@zmail07.collab.prod.int.phx2.redhat.com>
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

regards

Jaroslav
kbd-1.15.3-fix-load-defkeymap.patch (text/x-patch, 669 B)
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-05-07 22:33:42.000000000 +0200
+++ kbd-1.15.3/src/loadkeys.c	2011-10-09 14:34:52.533549215 +0200
@@ -2958,7 +2958,7 @@ int main(int argc, char *argv[])
 		close(fd);
 	}
 
-	for (i = optind; argv[i]; i++) {
+	for (i = optind; argv[i] || optd; i++) {
 		FILE *f;
 		char *ev;
 
@@ -2974,6 +2974,7 @@ int main(int argc, char *argv[])
 		if (optd) {
 			/* first read default map - search starts in . */
 			optd = 0;
+			i--;
 			if ((f = findfile(DEFMAP, dirpath, suffixes)) == NULL) {
 				fprintf(stderr, _("Cannot find %s\n"), DEFMAP);
 				exit(EXIT_FAILURE);
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.