APM power off on system halt

fritz.crusius (h0444vlt@rz.hu-berlin.de)
Sun, 25 May 1997 03:21:45 +0200 (CEST)


I wonder if there is any reason why kernel 2.1.39, unlike 2.0.30, won't
power down after 'shutdown -h now'. I have both CONFIG_APM and
CONFIG_APM_POWER_OFF set to 'y'.

In file kernel/sys.c, the function

asmlinkage int sys_reboot(int magic1, int magic2, int cmd, void * arg);

takes the commands LINUX_REBOOT_CMD_HALT and LINUX_REBOOT_CMD_POWER_OFF.
Am I right that the first command code should be passed to sys_reboot() on
system halt with CONFIG_APM_POWER_OFF=y ?

If sys_reboot() calls machine_power_off() instead of machine_halt(),
on my notebook kernel 2.1.39 turns off power like 2.0.30.

case LINUX_REBOOT_CMD_HALT:
notifier_call_chain(&reboot_notifier_list, SYS_HALT, NULL);
printk(KERN_EMERG "System halted.\n");
#if defined(CONFIG_APM) && defined(CONFIG_APM_POWER_OFF)
machine_power_off();
#else
machine_halt();
#endif
do_exit(0);
break;

---------------------->
/ / /| / / / \ /
/ / / | / / / X
/__ / / |/ /__/ / \
<----------------------
Fritz Crusius, h0444vlt@rz.hu-berlin.de