Commit 7b159b55d6398d2d240817276ae27ed68f11deda breaks ABI?

Danny Kukawka danny.kukawka at web.de
Fri Aug 31 13:01:11 PDT 2007


On Freitag, 31. August 2007, David Zeuthen wrote:
> On Wed, 2007-08-29 at 21:45 +0100, Matthew Garrett wrote:
> > The change to make GetBrightness calls return unsigned values breaks
> > g-p-m on 0.5.9, since it now assumes that values are unsigned and breaks
> > with the signed ones. Could this be reverted rather than breaking
> > visible ABI? Right now g-p-m effectively breaks on any released version
> > of hal, which is less than ideal.
>
> Yeah, it would be bad to break ABI. I can't remember why we did this and
> the thread the commit message points to
>
> http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=7b159b55d6398d2d240
>817276ae27ed68f11deda;hp=3734b53bafd98672db52ce55678f80136a5af84c
>
> yields no clues.  Anyway, I've reverted the patch for now. As a side
> effect g-p-m no longer complains with "Sleep problem" when I suspend via
> g-p-m (or close the lid) and FWIW brightness controls still work. Anyone
> know what made me commit that patch? Anyone? Bueller? Thanks.

The problem is/was: the scripts return UINT32 to the caller, but the addons as 
e.g. the macbook or dell brightness addon return in. And if someone check the 
return value for GetBrightness() it differ between the scripts and the 
addons, but the caller as to assume he get always the same return type from 
the same interface. If you only reverted the commit IMO/IIRC this would break 
again all returns from the addons. 

And if I understand the comment in [1] and [2] correct it would break also 
g-p-m (as now again KPowersave and powersaved) or not?

Danny

[1] http://lists.freedesktop.org/archives/hal/2007-May/008487.html
[2] http://lists.freedesktop.org/archives/hal/2007-February/007156.html



More information about the hal mailing list