#14: 'poweroff' doesn't work ------------------------------------+--------------------------------------- Reporter: hawke@hawkesnest.net | Owner: somebody Type: defect | Status: new Priority: minor | Milestone: Component: FILO | Version: Keywords: | Dependencies: Patchstatus: there is no patch | ------------------------------------+--------------------------------------- the 'poweroff' command doesn't seem to work, and just hangs filo. It would be nice for it to print an error message and return to the prompt rather than hanging.
#14: 'poweroff' doesn't work -------------------------------------+-------------------------------------- Reporter: hawke@hawkesnest.net | Owner: somebody Type: defect | Status: new Priority: minor | Milestone: Component: FILO | Version: Resolution: | Keywords: Dependencies: | Patchstatus: there is no patch -------------------------------------+--------------------------------------
Comment(by oxygene):
As far as I know, power-off works by writing to an IO-port and then wait for the system to shut down.
The only alternative would be to write the message ("It's safe to shut down your computer"), then do the power-off routine, so that the message is visible in case the system does not shut down.
Returning to the prompt would require the system to return some kind of error condition, so that filo knows that the system does not intend to cease operation.
Of course, fixing power-off itself is part of the solution, too... (see drivers/intel.c, platform_poweroff)
#14: 'poweroff' doesn't work -------------------------------------+-------------------------------------- Reporter: hawke@hawkesnest.net | Owner: somebody Type: defect | Status: new Priority: minor | Milestone: Component: FILO | Version: Resolution: | Keywords: Dependencies: | Patchstatus: there is no patch -------------------------------------+--------------------------------------
Comment(by hawke@hawkesnest.net):
Can't it be assumed that any time we're at the filo prompt, it's safe to shut down? I would certainly hope so. The only time it might be unsafe is while nvram is being written, and that's 1. a very small window, 2. very rare, and 3. not happening while at a prompt. I think it might be better to print "Attempting to power down...", run the poweroff routine, and then return to the commandline.