discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ANN: BatMon 0.3


From: David Chisnall
Subject: Re: ANN: BatMon 0.3
Date: Mon, 7 Jul 2008 22:58:04 +0100

On 7 Jul 2008, at 22:48, Riccardo wrote:

I don't like the idea of depending on DBus. All this power checking has too many layers, indirections and uncertainity already. Now Linux has also /sys filesystem and I bet I will end needing to support it alongside of /proc.

Linux completely fails at the one task an OS is meant to be good at - abstracting the hardware from developers. I had huge problems getting this code to work correctly on Linux, where 2.4 Vs 2.6 kernels, x86 Vs PowerPC, Monday Vs Tuesday, etc. all gave different format plain text files that needed to be parsed. There's now a library containing several thousand lines of code available to do on Linux something that is about a dozen lines of code on any of the BSD family.

OpenBSD is interesting though, I don't have it running on a Laptop, so I can't check and I refrain from blind-developing. But if you know of somebody who has OpenBSD on a laptop (yourself?) I will collaborate egaerly to support another system.

I don't have OpenBSD on a laptop, but the code is trivial - just read the relevant sysctls. I tested it on my colocated Mac Mini, which runs OpenBSD. You can find the code here:

http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Frameworks/SystemConfig/Source/SCPower_OpenBSD.m?rev=2509&view=auto

If you have any problems understanding it, check the relevant man page - unlike Linux, OpenBSD actually comes with useful documentation.

David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]