From 435b27388f2027ffdfa71cd2162ef0fcd5a32364 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 9 Dec 2003 11:01:19 +0000 Subject: can poweroff in UP --- mdk-stage1/init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mdk-stage1') 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"); } -- cgit v1.2.1