From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <6de288d34dada26e7586b3837535ce84.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199611171034.DAA03776@panda.mosberger> Date: 17 Nov 1996 11:49:50 -0000 From: Eric Smith Subject: Milo reboot change Here's a trivial patch to Milo that changes something that has been annoying the heck out of me. When I do a reboot, it seems rather counter-intuitive to me that pressing most keys will abort the reboot, but that ESCAPE will reboot immediately. I prefer to have RETURN reboot immediately, ESCAPE abort the reboot, and other keys ignored. Unfortunately "ignored" isn't quite right, as pressing other keys advances the timeout, but I didn't want to do a major rewrite of the keyboard input code. Another trivial change keeps the immediate reboot from showing the time as "0 27" (for example). *** milo.c.orig Fri Oct 18 10:36:47 1996 --- milo.c Sat Nov 16 19:41:04 1996 *************** *** 1109,1127 **** static int do_autoboot_timeout (unsigned timeout) { ! # define ASCII_ESCAPE 0x1b /* ASCII code of ESC key */ int key; ! printk("Hit any key to enter command mode, ESC to boot immediately\n"); printk("Seconds remaining: "); while (timeout--) { printk("%4d \b\b\b\b\b\b\b\b", timeout); key = kbd_getc_with_timeout(1); if (key >= 0) { ! if (key == ASCII_ESCAPE) { ! printk("0\n"); break; ! } else { printk("stopped.\nEntering command mode.\n"); return -1; /* argh, user whimped out on us... */ } --- 1109,1129 ---- static int do_autoboot_timeout (unsigned timeout) { ! # define ASCII_ESCAPE 0x1b /* ASCII code of ESCAPE key */ ! # define ASCII_RETURN 0x0d /* ASCII code of RETURN key */ ! int key; ! printk("Press RETURN to boot immediately, ESCAPE to abort.\n"); printk("Seconds remaining: "); while (timeout--) { printk("%4d \b\b\b\b\b\b\b\b", timeout); key = kbd_getc_with_timeout(1); if (key >= 0) { ! if (key == ASCII_RETURN) { ! printk("0 \n"); break; ! } else if (key == ASCII_ESCAPE) { printk("stopped.\nEntering command mode.\n"); return -1; /* argh, user whimped out on us... */ } -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com