Re: [PATCH 1/1] Add /sys/power/last_state support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 7, 2009, at 3:41 PM, "Rafael J. Wysocki" <rjw@xxxxxxx> wrote:

> On Sunday 06 December 2009, you wrote:
>> Hi, I have a completly unsolicited patch that I figured I should  
>> run past you
>> before proceeding to embarrass myself on lkml, as there does not  
>> seem to be
>> a linux kernel related mailing list more dedicated to power  
>> management.
>
> There is a pm list, <linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx>.  Please  
> post patches
> to this list in the future rather than to me directly, because I  
> have rather
> limited patch-reviewing capacity.

Yes, I found it shortly after sending you the patch.

>
>> This patch just adds /sys/power/last_state, which will make my job  
>> making
>> pm-utils more robust in the face of suspend or hibernate failure a  
>> little
>> easier.
>>
>> last_state will contain the last suspend state the kernel  
>> successfully
>> resumed from.  This sysfs interface was added so that userspace tools
>> (such as pm-utils) can determine whether the last requested power  
>> management
>> operation succeeded or failed without having to listen to uevents  
>> (a tricky
>> proposition when you are written in shell script), or parse the  
>> kernel event
>> log (annoying when most of the time things will succeed anyways).
>
> What exactly do you need the previous state for?

So that pm-utils could see whether or not suspend/hibernate worked or  
just returned due to a failure of some sort.

>
> Can't you just use the error code returned by "echo mem > /sys/power/ 
> state"?

I can, now that I know about it - I did not see anything about error  
codes when scanning the documentation.

>
> Rafael
>
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux