[patch] rtcwake: fix default suspend value

Bernhard Fischer rep.dot.nop at gmail.com
Mon Jun 2 20:49:01 UTC 2008


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" ?



More information about the busybox mailing list