[patch] rtcwake: fix default suspend value

Paulius Zaleckas paulius.zaleckas at teltonika.lt
Tue Jun 3 09:05:49 UTC 2008


Bernhard Fischer wrote:
> On Mon, Jun 02, 2008 at 04:35:43PM -0400, Mike Frysinger wrote:
>> On Monday 02 June 2008, Paulius Zaleckas wrote:
>>> Writing "suspend" to /sys/power/state does nothing.
>> it depends solely on your kernel configuration
> 
> If i'm not looking at the wrong spot, then
> # grep -A3 "\[PM_SUSPEND_MAX\]" kernel/power/main.c 
> static const char * const pm_states[PM_SUSPEND_MAX] = {
> 	[PM_SUSPEND_STANDBY]	= "standby",
> 	[PM_SUSPEND_MEM]	= "mem",
> };
> 
> So what about stating this in the config and providing a
> config CONFIG_RTCWAKE_DEFAULT_STATE
> 	string "default suspend state"
> 	default "suspend"
> 	help
> 	  Available suspend modi depend on your kernel config.
> 	  Per default this is set to "suspend", other possible values
> 	  include "standby". See kernel/power/ for details.
> 
> and using that instead of quasi hardcoding "suspend" ?

Linux kernel never had power state "suspend"! It was "standby", "mem"
and "disk" even in 2.6.12 and older. These values are hardcoded and
there is no way to change this in config!

I have send similar patch to util-linux-ng mailing list and I hope it
will be accepted.




More information about the busybox mailing list