Messages in this thread | | | From | (Stephen Harris) | Subject | Re: Minor request for enhancement: "beep on halt" | Date | Sun, 13 Dec 1998 21:27:45 GMT |
| |
Well, Alan Cox reckons my original patch was in the right place, so here's a version against 2.1.131. This is a lot better, because the shutdown code has been seperated out between the architectures, so I'm not too worried that this is intel only code... after all, it now lives in arch/i386 :-)
diff -cr linux-131/Documentation/Configure.help test-kernel/Documentation/Configure.help *** linux-131/Documentation/Configure.help Wed Dec 2 03:05:05 1998 --- test-kernel/Documentation/Configure.help Sun Dec 13 20:22:58 1998 *************** *** 106,111 **** --- 106,120 ---- If you are not sure, say Y; apart from resulting in a 45 KB bigger kernel, it won't hurt. + Repeated audio beeps on halt + CONFIG_BEEP_ON_HALT + On a system halt taking place the system will beep at 750Hz in a + one second on, one second off cycle. This allows headless systems + to indicate that the system is halted. Has no effect on the normal + running of the kernel. + + If APM is enabled with power off on halt option then this has no effect. + Normal PC floppy disk support CONFIG_BLK_DEV_FD If you want to use the floppy disk drive(s) of your PC under Linux, diff -cr linux-131/arch/i386/config.in test-kernel/arch/i386/config.in *** linux-131/arch/i386/config.in Sun Nov 29 04:32:10 1998 --- test-kernel/arch/i386/config.in Sun Dec 13 20:09:19 1998 *************** *** 20,25 **** --- 20,28 ---- if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then bool 'MTRR (Memory Type Range Register) support' CONFIG_MTRR fi + + bool 'Repeated audio beeps on halt' CONFIG_BEEP_ON_HALT + endmenu mainmenu_option next_comment diff -cr linux-131/arch/i386/kernel/process.c test-kernel/arch/i386/kernel/process.c *** linux-131/arch/i386/kernel/process.c Tue Dec 1 19:28:24 1998 --- test-kernel/arch/i386/kernel/process.c Sun Dec 13 20:11:49 1998 *************** *** 366,371 **** --- 366,384 ---- void machine_halt(void) { + #if defined(CONFIG_BEEP_ON_HALT) + while (1) { + /* This is stolen from drivers/char/vt.c */ + /* beep is 750Hz */ + outb_p(inb_p(0x61)|3,0x61); + outb_p(0xB6,0x43); + outb_p(54,0x42); + outb_p(6,0x42); + udelay(1000000L); + outb_p(inb_p(0x61)&0xFC,0x61); + udelay(1000000L); + } + #endif } void machine_power_off(void)
-- Stephen Harris sweh@spuddy.mew.co.uk http://www.spuddy.org/ The truth is the truth, and opinion just opinion. But what is what? My employer pays to ignore my opinions; you get to do it for free. * Meeeeow ! Call Spud the Cat on > 01268 515441 < for free Usenet access *
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |