From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 7 13:13:44 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08F3A106566C; Mon, 7 Jul 2008 13:13:44 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from mail.pica.nl (mail.pica.nl [192.87.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id 8A7EE8FC0C; Mon, 7 Jul 2008 13:13:43 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from rebelion.Sisis.de ([193.31.10.34]) by mail.pica.nl with Microsoft SMTPSVC(6.0.3790.3959); Mon, 7 Jul 2008 15:13:41 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m67DDfcj012935; Mon, 7 Jul 2008 15:13:41 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Mon, 7 Jul 2008 15:13:41 +0200 From: Matthias Apitz To: Rui Paulo Message-ID: <20080707131341.GA12862@rebelion.Sisis.de> References: <20080626231603.GC6875@phi.local> <20080627080203.GA19602@rebelion.Sisis.de> <20080627194447.GA34524@phi.local> <20080629160527.GA17075@rebelion.Sisis.de> <20080629162234.GB1261@phi.local> <20080701090220.GA4431@rebelion.Sisis.de> <20080701111426.GA1152@phi.local> <20080704144002.GA3661@rebelion.Sisis.de> <20080707121937.GA15609@rebelion.Sisis.de> <20080707124538.GA1752@phi.local> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080707124538.GA1752@phi.local> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) X-OriginalArrivalTime: 07 Jul 2008 13:13:42.0021 (UTC) FILETIME=[470F7B50:01C8E033] Cc: freebsd-hackers@FreeBSD.org, james@nighthack.org, Manolis Kiagias Subject: Re: eeePC 900 && turning off wireless (ath0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2008 13:13:44 -0000 El día Monday, July 07, 2008 a las 01:45:38PM +0100, Rui Paulo escribió: > On Mon, Jul 07, 2008 at 02:19:37PM +0200, Matthias Apitz wrote: > > /* Notify devd(8) */ > > device_printf(sc->dev, > > "Fn+F2 pressed, notify to devd(8) is %08x\n", notify); > > acpi_UserNotify("ASUS-Eee", h, notify); > > > > and it turns out that in case of switching wireless of it is 0x00000011, > > while on switch-on it is 0x00000010; but the devd(8) only sees both > > events as '_SB_.ATKD'; I've grep'ed a lot around but can't see the place > > where the hex events of acpi_UserNotify() are converted into the string > > '_SB_.ATKD', any idea where to look; > > They are not converted, your devd.conf entries are probably wrong. > > Can you show again where do you get _SB_.ATKD from? You are right! my file /usr/local/etc/devd/ath.conf for devd(8) says now: tify 1 { match "system" "ACPI"; action "/usr/local/etc/devd/ath.sh $system $subsystem $notify"; }; notify 1 { match "system" "IFNET"; match "subsystem" "ath0"; match "type" "LINK_UP"; action "/usr/local/etc/devd/ath.sh $system $subsystem $type"; }; notify 1 { match "system" "IFNET"; match "subsystem" "ath0"; match "type" "LINK_DOWN"; action "/usr/local/etc/devd/ath.sh $system $subsystem $type"; }; note that in the case of "IFNET" you have to watch the $type to see LINK_UP or LINK_DOWN as the events, while in "ACPI" you have to watch the $notify ($type gives you _SB_.ATKD, $notify gives you 0x10 or 0x11); thanks for the answer which let me look closer into the man page of devd.conf; matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ «...una sola vez, que es cuanto basta si se trata de verdades definitivas.» «...only once, which is enough if it has todo with definite truth.» José Saramago, Historia del Cerca de Lisboa