* Milo reboot change
@ 1996-11-17 11:49 Eric Smith
0 siblings, 0 replies; only message in thread
From: Eric Smith @ 1996-11-17 11:49 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-11-17 11:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-11-17 11:49 Milo reboot change Eric Smith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox