[Sugar-devel] [PATCH] Control Panel, Power section: check if powerd is available OLPC #11437
Sascha Silbe
sascha-ml-reply-to-2011-4 at silbe.org
Mon Nov 28 09:00:47 EST 2011
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
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20111128/05eae292/attachment.pgp>
More information about the Sugar-devel
mailing list