From owner-freebsd-acpi@FreeBSD.ORG Wed Apr 22 13:04:16 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 804AC1065670 for ; Wed, 22 Apr 2009 13:04:16 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B168A8FC1B for ; Wed, 22 Apr 2009 13:04:15 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA16367; Wed, 22 Apr 2009 16:03:44 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <49EF15B0.10402@icyb.net.ua> Date: Wed, 22 Apr 2009 16:03:44 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: Nate Lawson References: <49DE1F8B.2080400@earthlink.net> <49DE2E6D.5050001@icyb.net.ua> <49DE596E.2050406@earthlink.net> <49DEFF53.1040306@icyb.net.ua> <49DF7A1C.90009@root.org> <20090418043432.O34434@sola.nimnet.asn.au> <49E8D824.1000001@root.org> <20090417200726.GG3014@deviant.kiev.zoral.com.ua> <49E8E6E3.40304@root.org> <49EDFAED.4030606@icyb.net.ua> <49EE1863.1000306@root.org> In-Reply-To: <49EE1863.1000306@root.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: sclark46@earthlink.net, freebsd-acpi@freebsd.org, Ian Smith Subject: Re: 6.x acpi powerbutton X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2009 13:04:16 -0000 on 21/04/2009 22:02 Nate Lawson said the following: > > I don't think that's what they're asking for. The normal shutdown > process creates log entries, even if destined for poweroff. For example, > shutdown -p will log before powering off. acpi_ReqSleepState() can come > through /dev/apm, sysctl, etc. as well as the power button handler. Yes, the normal shutdown does log. But the other types of Sx state changes do not seem to get logged anywhere, so I think that that log message might still be useful. > They are interested in the initiator of the event, the button itself. So > you'd be adding a printf to the power button handler, "power button > pressed". Then the normal shutdown messages would be logged but they > would know the reason. Remember that with sysctl, you can configure > different events to button mappings. So the power button could be used > to initiate a suspend, for example. Yes, I agree. Which place do you think is the best for this log - acpi sleep event handler (acpi_system_eventhandler_sleep) or individual sleep event triggers (power button sleep button, lid)? -- Andriy Gapon