summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-12-09 11:01:19 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-12-09 11:01:19 +0000
commit435b27388f2027ffdfa71cd2162ef0fcd5a32364 (patch)
treecdfd4f0aaa098361ee0c9a24be999c3ea878f239 /mdk-stage1
parent422b58338aefc7964bbca596fb4ed56f5e1e9955 (diff)
downloaddrakx-435b27388f2027ffdfa71cd2162ef0fcd5a32364.tar
drakx-435b27388f2027ffdfa71cd2162ef0fcd5a32364.tar.gz
drakx-435b27388f2027ffdfa71cd2162ef0fcd5a32364.tar.bz2
drakx-435b27388f2027ffdfa71cd2162ef0fcd5a32364.tar.xz
drakx-435b27388f2027ffdfa71cd2162ef0fcd5a32364.zip
can poweroff in UP
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c
index 47f519f7d..a618312bb 100644
--- a/mdk-stage1/init.c
+++ b/mdk-stage1/init.c
@@ -421,7 +421,7 @@ int in_reboot(void)
int i = read(fd, buf, sizeof(buf));
close(fd);
if (strstr(buf, "halt"))
- reboot_magic = BMAGIC_HALT;
+ reboot_magic = BMAGIC_POWEROFF;
return i > 0;
}
return 0;
@@ -562,11 +562,11 @@ int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))
if (reboot_magic == BMAGIC_REBOOT) {
printf("automatic reboot in 10 seconds\n");
sleep(10);
- reboot(0xfee1dead, 672274793, reboot_magic);
} else {
- printf("you can safely turn your computer off\n");
- /* if I ask kernel to do BMAGIC_POWEROFF, it panics :( */
+ printf("automatic poweroff in 15 seconds\n");
+ sleep(15);
}
+ reboot(0xfee1dead, 672274793, reboot_magic);
} else {
printf("you may safely reboot or halt your system\n");
}