diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
commit | 27cfca1ec98e91261b1a5355d10a8996464b63af (patch) | |
tree | 8e895a53e372fa682b4c0a585b9377d67ed70d0e /drivers/char/sysrq.c | |
parent | 6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff) |
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too
o Upgrade to 2.1.89.
Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'drivers/char/sysrq.c')
-rw-r--r-- | drivers/char/sysrq.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 25396c3c1..a518f6b6a 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * - * $Id: sysrq.c,v 1.4 1997/07/17 11:54:15 mj Exp $ + * $Id: sysrq.c,v 1.7 1997/11/06 15:57:09 mj Exp $ * * Linux Magic System Request Key Hacks * @@ -31,10 +31,6 @@ extern void reset_vc(unsigned int); extern int console_loglevel; extern struct vfsmount *vfsmntlist; -#ifdef __sparc__ -extern void halt_now(void); -#endif - /* Send a signal to all user processes */ static void send_sig_all(int sig, int even_init) @@ -60,6 +56,9 @@ void handle_sysrq(int key, struct pt_regs *pt_regs, { int orig_log_level = console_loglevel; + if (!key) + return; + console_loglevel = 7; printk(KERN_INFO "SysRq: "); switch (key) { @@ -69,7 +68,7 @@ void handle_sysrq(int key, struct pt_regs *pt_regs, printk("Keyboard mode set to XLATE\n"); } break; - case 'a': /* A -- SAK */ + case 'k': /* K -- SAK */ printk("SAK\n"); if (tty) do_SAK(tty); @@ -79,12 +78,6 @@ void handle_sysrq(int key, struct pt_regs *pt_regs, printk("Resetting\n"); machine_restart(NULL); break; -#ifdef __sparc__ - case 'h': /* H -- halt immediately */ - printk("Halting\n"); - halt_now(); - break; -#endif #ifdef CONFIG_APM case 'o': /* O -- power off */ printk("Power off\n"); @@ -123,7 +116,7 @@ void handle_sysrq(int key, struct pt_regs *pt_regs, send_sig_all(SIGTERM, 0); orig_log_level = 8; /* We probably have killed syslogd */ break; - case 'k': /* K -- kill all user processes */ + case 'i': /* I -- kill all user processes */ printk("Kill All Tasks\n"); send_sig_all(SIGKILL, 0); orig_log_level = 8; @@ -134,14 +127,16 @@ void handle_sysrq(int key, struct pt_regs *pt_regs, orig_log_level = 8; break; default: /* Unknown: help */ - printk("unRaw sAk Boot " -#ifdef __sparc__ - "Halt " -#endif + if (kbd) + printk("unRaw "); + if (tty) + printk("saK "); + printk("Boot " #ifdef CONFIG_APM "Off " #endif - "Sync Unmount showPc showTasks showMem loglevel0-8 tErm Kill killalL\n"); + "Sync Unmount showPc showTasks showMem loglevel0-8 tErm kIll killalL\n"); + /* Don't use 'A' as it's handled specially on the Sparc */ } console_loglevel = orig_log_level; @@ -176,9 +171,9 @@ static int is_local_disk(kdev_t dev) /* Guess if the device is a local hard static void go_sync(kdev_t dev, int remount_flag) { - printk(KERN_INFO "%sing device %04x ... ", + printk(KERN_INFO "%sing device %s ... ", remount_flag ? "Remount" : "Sync", - dev); + kdevname(dev)); if (remount_flag) { /* Remount R/O */ struct super_block *sb = get_super(dev); |