[Pm-utils] [patch-commit] restorestate extra testing and cpufreq hook fixes
Till Maas
opensource at till.name
Tue Jan 29 16:59:02 PST 2008
Aloa,
- test whether statefile exists in restorestate
restorestate did not check whether a file exists before running cat at it.
- only restore governor if one was actually stored
There was a logic error: Only when the stored governor was empty, i.e. no
governor was stored, it is restored. The test for an empty string was changed
to a test for a non-empty string.
- return 1 in case there is no cpu that can use a governor
Now the cpufreq hook should return 1 in case there is no cpu available that
supports setting a governor. Imho we should define some variables to give
returncodes a meaning, e.g.
RET_OK=0
RET_SKIPPED=1
RET_ERROR=2
and then use RET_SKIPPED in case a hook does not need to be ran, e.g. for the
cpufreq hook because it does not support setting governors. This could then
be evaluated by pm-utils. I will write a patch if there are no objections.
- extra quoting in cpufreq
There was a variable assignment without using quotes.
Regards,
Till
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pm-utils-cpufreq-and-restorestate.patch
Type: text/x-diff
Size: 1546 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/pm-utils/attachments/20080130/296edf04/attachment.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/pm-utils/attachments/20080130/296edf04/attachment.pgp
More information about the Pm-utils
mailing list