[Sugar-devel] [PATCH] Control Panel, Power section: check if powerd is available OLPC #11437

Simon Schampijer simon at schampijer.de
Mon Nov 28 09:49:27 EST 2011


On 28/11/11 15:00, Sascha Silbe wrote:
> Excerpts from Simon Schampijer's message of 2011-11-28 10:42:05 +0100:
>
>> On the XO 1.75 '/ofw' is not used anymore on the XO-1.75,
>> '/proc/device-tree' is used now instead. Check if powerd
>> is available to determine if the power section is displayed or
>> not.
>
> How about:
>
> Recent versions of the kernel export the Open Firmware device tree to
> user space as /proc/device-tree, rather than /ofw (the latter was
> specific to OLPC kernels). We checked for existence of /ofw to determine
> whether we're running on an OLPC XO and assumed it's running
> olpc-powerd, since that is what we actually try to control. By checking
> for a directory created by olpc-powerd, we make sure that it's actually
> available (to us) and works on any kernel version.
>
> Sascha
>

Sounds good. The patch itself is fine?

Regards,
    Simon


More information about the Sugar-devel mailing list