On Fri 25. Jan - 03:57:14, Michael Biebl wrote:
> Danny Kukawka wrote:
>> On Donnerstag, 24. Januar 2008, Holger Macht wrote:
>>> On Thu 24. Jan - 02:33:43, Michael Biebl wrote:
>> [...]
>>> Has this been removed lately from HAL? I'm currently using a git snapshot
>>> from 2007-12-12 and
>>>
>>> dbus-send --system --print-reply --dest=org.freedesktop.Hal
>>> /org/freedesktop/Hal/devices/computer
>>> org.freedesktop.Hal.Device.IsCallerPrivileged string:hal-power-suspend
>>> string:":1.9044"
>>
>> It's now org.freedesktop.hal.power-management.hibernate instead of 
>> hal-power-suspend. Our hal on 10.3 was ported to use the old names since 
>> the change was to late for 10.3.
>>
>
> Could this be changed in trunk then to match the upstream hal names?
>
> While looking at the code, I noticed some oddities, too:
> user_binary/powersave.cpp:633ff
>
> if (liblazy_hal_get_property_bool(HAL_UDI_COMPUTER,
> "power_management.can_suspend", &supported) && !supported) {
> ...
> if (!liblazy_hal_get_property_bool(HAL_UDI_COMPUTER,
> "power_management.can_standby", &supported) && !supported) {
> ...
> if (!liblazy_hal_get_property_bool(HAL_UDI_COMPUTER,
> "power_management.can_hibernate", &supported) && !supported) {
>
> 1.) It's liblazy..() for suspend and !liblazy..() for standby and hibernate
> 2.) The can_standby property is a SUSE specific patch.
> If I run powersave -m on Debian, the
>
> if (!liblazy_hal_get_property_bool(HAL_UDI_COMPUTER,
> "power_management.can_standby", &supported) && !supported)
>
> check succeeds.
> LIBLAZY_ERROR_HAL_NO_SUCH_PROPERTY (-11) is returned for liblazy..() and 
> supported is -1. Both negated is != 0.
> The return values of liblazy_hal_get_property_bool can be -11, 0 (success) 
> and 1.
> The values of supported can be -1, 0 and 1 (success).
> So I'd suggest to use
> if(liblazy_hal_is_caller_privileged() || supported != 1) {
>
> A patch which fixes that and uses the new hal policy names, is attached.

Thanks for the patch, I've committed it. However, my system is currently
broken (cannot compile c++ programs), so I could not test it. I'll do a
release as soon as I've verified that it's working.

Thanks,
        Holger
_______________________________________________
powersave-devel mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/powersave-devel

Reply via email to