lkml.org 
[lkml]   [2004]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Totally broken PCI PM calls
Hello,

Pavel Machek wrote:

>>p.s. I find the /sys/power/disk file mildly cryptic, maybe
>> other folk will find the attached patch slightly more
>> informative about what this interface can do.
>
>>--- 1.19/kernel/power/disk.c Thu Sep 9 08:45:13 2004
>>+++ edited/kernel/power/disk.c Fri Oct 1 11:01:41 2004
>>@@ -282,7 +282,14 @@
>>
>> static ssize_t disk_show(struct subsystem * subsys, char * buf)
>> {
>>- return sprintf(buf,"%s\n",pm_disk_modes[pm_disk_mode]);
>>+ return sprintf(buf,"%s%s %s%s %s%s\n",
>>+ (pm_disk_mode == pm_ops->pm_disk_mode) ? "*" : "",
>>+ pm_disk_modes[pm_ops->pm_disk_mode],
>>+ (pm_disk_mode == PM_DISK_SHUTDOWN) ? "*" : "",
>>+ pm_disk_modes[PM_DISK_SHUTDOWN],
>>+ (pm_disk_mode == PM_DISK_REBOOT) ? "*" : "",
>>+ pm_disk_modes[PM_DISK_REBOOT]
>>+ );
>> }
>
> Hmm, its interface change,

yes, this would break _my_ userspace app that checks for successfully
setting shutdown mode by reading out the file, but well, i could live
with that.

> and was not /sys expected to be "one file, one value"?

# cat /sys/power/state
standby mem disk

so one could assume that /sys/power/disk would have similar semantics.
OTOH, /sys/power/state does not indicate the active state but
/sys/power/disk does, so they _are_ different.
--
Stefan Seyfried, QA / R&D Team Mobile Devices, SUSE LINUX AG Nürnberg.

"Any ideas, John?"
"Well, surrounding them's out."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [from the cache]
©2003-2011 Jasper Spaans