patch-2.4.0-test4 linux/arch/sparc64/kernel/power.c
Next file: linux/arch/sparc64/kernel/process.c
Previous file: linux/arch/sparc64/kernel/entry.S
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Tue Jul 11 15:46:08 2000
- Orig file:
v2.4.0-test3/linux/arch/sparc64/kernel/power.c
- Orig date:
Wed Apr 26 16:34:07 2000
diff -u --recursive --new-file v2.4.0-test3/linux/arch/sparc64/kernel/power.c linux/arch/sparc64/kernel/power.c
@@ -1,4 +1,4 @@
-/* $Id: power.c,v 1.6 2000/04/13 00:59:59 davem Exp $
+/* $Id: power.c,v 1.8 2000/07/11 22:41:33 davem Exp $
* power.c: Power management driver.
*
* Copyright (C) 1999 David S. Miller (davem@redhat.com)
@@ -35,10 +35,12 @@
extern void machine_halt(void);
+extern int serial_console;
+
void machine_power_off(void)
{
#ifdef CONFIG_PCI
- if (power_reg != 0UL) {
+ if (power_reg != 0UL && !serial_console) {
/* Both register bits seem to have the
* same effect, so until I figure out
* what the difference is...
@@ -53,7 +55,7 @@
static int powerd(void *__unused)
{
static char *envp[] = { "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
- char *argv[] = { "/usr/bin/shutdown", "-h", "now", NULL };
+ char *argv[] = { "/sbin/shutdown", "-h", "now", NULL };
daemonize();
sprintf(current->comm, "powerd");
@@ -67,7 +69,7 @@
}
/* Ok, down we go... */
- if (execve("/usr/bin/shutdown", argv, envp) < 0) {
+ if (execve("/sbin/shutdown", argv, envp) < 0) {
printk("powerd: shutdown execution failed\n");
button_pressed = 0;
goto again;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)