detecting hibernation capability

Richard Hughes hughsient at gmail.com
Wed Nov 30 09:16:20 PST 2005


On Wed, 2005-11-30 at 12:00 -0500, Joe Shaw wrote:
> We should probably still set the properties to FALSE even if we can't
> open /sys/power/state.

Yes, good point.

> > +       getline(&poweroptions, &len, fp);
> 
> Shouldn't len be unassigned here?  I think, since poweroptions will be
> allocated automatically by getline(), that len will be filled in with
> the correct value.  I think setting it to 128 is unnecessary.

Yes agreed. We should set this to zero so that getline always mallocs us
a string (that we then free).

Thanks Joe. New patch attached.

Richard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-can_hibernate2.patch
Type: text/x-patch
Size: 2517 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20051130/138f47ec/hal-can_hibernate2.bin


More information about the hal mailing list