X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fkeyboard.c;h=5eb7d6b490921495e36895d3f3c10b053058c459;hb=38482d86320b405b91ec00db15f1bcaa8031fd3a;hp=5b068582baf483e6f677332d28153a242f1d71c2;hpb=4f67d9454f62c56af9576d52772b9f4ce693a050;p=palacios-OLD.git diff --git a/palacios/src/devices/keyboard.c b/palacios/src/devices/keyboard.c index 5b06858..5eb7d6b 100644 --- a/palacios/src/devices/keyboard.c +++ b/palacios/src/devices/keyboard.c @@ -876,15 +876,20 @@ static int keyboard_write_output(struct guest_info * core, ushort_t port, void * PrintDebug("Keyboard: scancode set being read\n"); push_to_output_queue(kbd, 0x45 - 2 * kbd->scancode_set, COMMAND, KEYBOARD); break; + case 1: + PrintError("keyboard: unsupported scancode set %d selected\n", data); + return -1; case 2: PrintDebug("Keyboard: scancode set being set to %d\n", data); kbd->scancode_set = data; push_to_output_queue(kbd, 0xfa, COMMAND, KEYBOARD); break; - case 1: case 3: - PrintError("keyboard: unsupported scancode set %d selected\n", data); - return -1; + /* OpenBSD wants scancode set 3, but falls back to 2 if a + * subsequent read reveals that the request was ignored + */ + PrintError("keyboard: ignoring request for scancode set %d\n", data); + break; default: PrintError("keyboard: unknown scancode set %d selected\n", data); return -1;