using this debug patch

--- a/console-tools/loadkmap.c
+++ b/console-tools/loadkmap.c
@@ -67,7 +67,10 @@ int loadkmap_main(int argc UNUSED_PARAM, char **argv)
                                ke.kb_index = j;
                                ke.kb_table = i;
                                ke.kb_value = ibuff[j];
-                               ioctl(fd, KDSKBENT, &ke);
+                               if(ioctl(fd, KDSKBENT, &ke))
+ dprintf(2, "warning: failed to set key slot %zu,%zu to %d, reason: %s\n",
+                                       i, j, ke.kb_value, strerror(errno));
+
                        }
                }
        }


one can see that loadkmap does not handle the value K_ALLOCATED == 638 correctly. when we dump and load the kmap multiple times, the number of errors increase.

if we begin with
loadkeys /share/keymaps/i386/qwertz/de_CH-latin1.map.gz (loadkeys from kbd-1.15.3)
dumpkmap > test.kmap
loadkmap < test.kmap
warning: failed to set key slot 6,0 to 638, reason: Invalid argument
dumpkmap > test.kmap
loadkmap < test.kmap
warning: failed to set key slot 6,0 to 638, reason: Invalid argument
warning: failed to set key slot 9,0 to 638, reason: Invalid argument
warning: failed to set key slot 10,0 to 638, reason: Invalid argument

unfortunately both kernel source code and kbd source is undocumented when they deal with K_ALLOCATED and K_NOSUCHMAP, so i am uncertain on how to fix it.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to