> > Do you have machdep.forceukbd=1 somewhere in /etc/sysctl.conf? > > Ah, yes! And there's no USB keyboard now, I added that when the > disk was in a real machine before I moved it to a VM.
Ok, so this is what causes the keymap pointer to be reset to NULL. Phew!
Root cause found.
Anton, could you tweak your diff so that it becomes something like
count = 0;
if (sc->id->t_keymap.keydesc)
for (; sc->id->t_keymap.keydesc[count].name; count ++)
...
in order to only check for a NULL pointer once?
