[PATCH] GetBrightness method has to return _unsigned_ int

Richard Hughes hughsient at gmail.com
Wed May 30 06:47:09 PDT 2007


On Wed, 2007-05-30 at 14:20 +0200, Holger Macht wrote:
> The GetBrightness method in the macbook* addons wrongly supplies a signed
> integer as the first argument in the reply. This makes a call similar to
> 
>   dbus_message_get_args(reply, &err, DBUS_TYPE_UINT32,
> 	                &brightness, DBUS_TYPE_INVALID)) {
> 
> fail in the calling process.

Yes I failed to find the bug a few months ago where the dell addon won't
work with g-p-m.

> However, all applications I looked into (gpm, kpowersave, powersaved) have
> a call similar to this.
> 
> I currently don't see where it is specified that the GetBrightness method
> has to return an UINT32 at all. Neither the
> hal-system-lcd-get-brightness-linux script nor
> 10-laptop-panel-mgmt-policy.fdi doesn't assume this AFAICS. Maybe someone
> can tell...

See http://bugzilla.gnome.org/show_bug.cgi?id=404474 - there's lots of
data there.

Richard.




More information about the hal mailing list