From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: Re: Warn user when battery goes critical Date: Tue, 13 Apr 2004 22:02:51 +0200 Sender: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Message-ID: <20040413200251.GI468@openzaurus.ucw.cz> References: <20040405211032.GA3575@elf.ucw.cz> <20040408171527.GH23710@message-id.gmane0305.slipkontur.de> <1081802715.3428.40.camel@darkstar> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1081802715.3428.40.camel-4/PLUo9XfK8@public.gmane.org> Errors-To: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: S Monteiro Basto Cc: Stefan Seyfried , hegbloom-tbDHPZwbsQQ@public.gmane.org, acpi-devel List-Id: linux-acpi@vger.kernel.org Hi! > > > When battery is going critical, perhaps user should know? It already > > > helped me when power was turned off at expansion cord... > > > > > + if (!res && (bst->state & 0x04)) > > > + printk(KERN_CRIT "Battery status: critical\n"); > > > > This should go into userspace IMO. There are some applications that will > > handle this, so no need for code bloat in the kernel. > > > > Hey! I'd never thought i could one day accuse Pavel of "eyecandy bloat" ;-) > > :-). Yes battery monitors exist and yes, I should watch /proc/acpi/battery.../state; otoh it is clearly an critical condition, and I should not be forced to run cpu-eating battery monitor daemon when kernel knows without polling. Pavel -- 64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click