Holger Macht wrote:
> On Tue 09. Aug 17:08:47, Thomas Renninger wrote:
>>[EMAIL PROTECTED] wrote:
>>>CVS commit to /cvsroot/powersave/powersave/daemon by hmacht
>>>
>>>Modified Files:
>>>     powersaved.cpp 
>>>Log Message:
>>>- added correct returns
>>>- return ac state correctly if ac adapter status is not available
>>>
..
>>>                                      DBUS_TYPE_STRING, &policy,
>>>@@ -1604,8 +1606,11 @@
>>>             case AC_OFFLINE:
>>>                     dummy = "off";
>>>                     break;
>>>+            case AC_UNKNOWN:
>>>+                    dummy = "unknown";
>>>+                    break;
>>Why does unknown exist powersaved.cpp now?
>>I only used this in deeper functions (libpowersave).
>>The daemon itself only knows about ac/battery or you have to
>>test for unknown all the time which practically cannot exists.
> 
> And how should we tell the client that we do not know the ac state? Maybe
> hal died and powersave can't tell the client the ac state. But the client
> would maybe be able to figure out the state on his own. What's the problem
> with telling the client that we do simply not know the state?
> 
IMO this is a not needed workaround that produces code overhead and could likely
be a pitfall.
Either hal can tell the right state or not. If not, other clients shouldn't be 
able
to do so as well as all are using the same kernel interface.
If really hal can't tell, but clients can, we should fix up hal.
If the hardware is broken the client could know that it is broken, but would it
make a difference to the "online" state?

>>Better remove unknown and asume online.
> 
> I don't think so. Maybe I think my mashine is on power and suddenly the
> light goes out.

If you assume online the light should go on, or?

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

Reply via email to