Datastore & backup - request for help
Bert Freudenberg
bert at freudenbergs.de
Wed May 21 04:40:51 EDT 2008
On 21.05.2008, at 00:34, Martin Langhoff wrote:
> On Tue, May 20, 2008 at 11:43 PM, Bert Freudenberg <bert at freudenbergs.de
> > wrote:
>> Ah, Marco rightly pointed out hal-get-property. Much easier that way:
>>
>> hal-get-property --udi $battery --key battery.charge_level.percentage
>> hal-get-property --udi $ac_adapter --key ac_adapter.present
>
> Great! Each portable check is about 60ms vs 30ms for me, so I've added
> the portable version if we can't find the OLPC-specific entries under
> /sys. Done and pushed out.
Yes, hal-* does a D-Bus round-trip. You could get as fast by using HAL
only to find the actual sysfs path, and subsequently fetching the data
directly from sysfs:
hal-get-property --udi $battery --key linux.sysfs_path
> Now, is there a reasonable way to check for whether we are in a
> school mesh?
No idea.
- Bert -
More information about the Devel
mailing list