lkml.org 
[lkml]   [1997]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Rebooting and APM halt
> I've noticed since the new reboot changes were put into 2.1.30 that my laptop
> compiled with CONFIG_APM_POWER_OFF no longer turns off when I do a halt.
> What program will give the correct sequence of stuff in linux/kernel/sys.c
> to actually halt and power off the system?

The change was first made in the SPARC tree since the notions of
"halt" and "power off" are very different. On a SPARC, "halt" returns
the system to monitor mode while "power off" shuts off the
system. Many other systems make the same distinction.

As a temporary fix, change the call to the reboot() system call in
your halt program to the following and recompile:

#include <linux/reboot.h>

...

reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
LINUX_REBOOT_CMD_POWER_OFF);


And name this new binary "poweroff" or something close.

What should really happen is that the SysVInit maintainer whoever he
is should add a "power down" runlevel just like most other Unix
systems like Solaris have.

Tom

\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.038 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site