Date: Tue, 13 Jul 2004 15:51:26 +0200 From: Phil Schulz <ph.schulz@gmx.de> To: freebsd-hackers@freebsd.org Subject: Code review / Monitoring battery Message-ID: <40F3E8DE.3050005@gmx.de>
next in thread | raw e-mail | index | archive | help
Hello! I wrote a little daemon which monitors the value of sysctl hw.acpi.battery.life and issues me two warnings before shutting down the machine in case of low battery. Since this is one of my first steps in Unix-programming, I wonder if anyone might take a minute or two to look over the code and comment on it. I put a lot of comments all over the place, especially where I'm unsure about how things work. The source code can be found at [1]. Please note that this 'server' is connected over an ADSL line with only 128kbps upstream just in case you wonder why it's so slow. Also I'd like to know if anyone knows something similar to this little tool. I found wmbattery from ports, but it doesn't shut down the computer. If there isn't such a program, I'd be happy to make this little thing a port (provided that there is need for it). Thanks, Phil. [1] http://phil.homeunix.net:8000/battd.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40F3E8DE.3050005>