rombios: Remove annoying 3-second boot delay waiting for user to hit
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 23 May 2008 10:58:08 +0000 (11:58 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 23 May 2008 10:58:08 +0000 (11:58 +0100)
F10 to select boot device. This will be rarely used, and it is
possible to hit F10 before the message is displayed and the keypress
will still register. So in practice it is quite possibel to use this
boot feature reliably without needing a multi-second delay.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/firmware/rombios/rombios.c

index a6191d30fee0d7f982aeb28327b398508e7c6736..23558e8f45bcf50cad8be5f43d5fad4ce9ec515a 100644 (file)
@@ -2225,26 +2225,12 @@ void interactive_bootkey()
     Bit16u i;
     Bit8u scan = 0;
 
-    bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "\n\nPress F10 to select boot device.\n");
-    for (i = 3; i > 0; i--)
-    {
-        scan = wait(WAIT_HZ, 0);
-        switch (scan) {
-        case 0x3D:
-        case 0x3E:
-        case 0x3F:
-        case 0x58:
-            break;
-        case 0x44:
-            scan = bootmenu(inb_cmos(0x3d) & 0x0f);
-            break;
-        default:
-            scan = 0;
-            break;
-        }
-        if (scan != 0)
-            break;
-    }
+    bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO,
+                "\n\nPress F10 to select boot device.\n");
+
+    scan = wait(1, 0);
+    if (scan == 0x44)
+        scan = bootmenu(inb_cmos(0x3d) & 0x0f);
 
     /* set the default based on the keypress or menu */
     switch(scan) {