On Thu, Feb 10, 2011 at 10:02:20AM +0100, Lawrence Rust wrote: > On Wed, 2011-02-09 at 18:46 +0100, Lawrence Rust wrote: > > This patch adds a test to rtcwake to verify that the requested suspend > > mode (standby|mem|disk) is available. If not it exits with error. > > > > This avoids the current situation where a request to suspend with an > > unsupported mode fails quietly and rtcwake returns immediately. > > > > See linux-2.6.37/Documentation/power/interface.txt > > Oops, looking at the kernel code some more: > > linux-2.6.37/kernel/power/main.c function state_show() > > It seems that reading /sys/power/state results in a space separated list > rather than the highest state supported as I had believed. This makes > the code somewhat easier. So here's the revised form > > Signed-off-by: Lawrence Rust <lawrence(at)softsystem(dot)co(dot)uk> Applied, thanks. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html