From owner-freebsd-current@FreeBSD.ORG Wed Oct 19 17:46:51 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5068416A41F for ; Wed, 19 Oct 2005 17:46:51 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1F2A43D45 for ; Wed, 19 Oct 2005 17:46:50 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.200] ([10.0.0.200]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j9JHkjpU063799 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 19 Oct 2005 10:46:46 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <43568675.4020409@errno.com> Date: Wed, 19 Oct 2005 10:46:29 -0700 From: Sam Leffler User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050927) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Niki Denev References: <200510181233.47769.nike_d@cytexbg.com> <43554809.4060900@errno.com> <4356129F.90602@cytexbg.com> <200510191958.27827.nike_d@cytexbg.com> In-Reply-To: <200510191958.27827.nike_d@cytexbg.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: ath not setting media type? [SOLVED : devd is to blame] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 17:46:51 -0000 Niki Denev wrote: > I think i found the problem, and it's in devd. > > The problem affects only the media/link status notify events because > there the interface name is supplied in the variable "subsystem", > which fails to be assigned properly. > > I'm not C++ expert but it looks that the duplicated declaration of the > variable "value" is the problem. > I wonder why compiler doesn't complain about this... but i may be wrong, > because i don't know anyting about c++ :) > > this patch fixed it for me : > > ------------------------------------------------------------------------------------------------ > --- devd.cc.orig Wed Oct 19 19:50:28 2005 > +++ devd.cc Wed Oct 19 19:53:29 2005 > @@ -233,7 +233,7 @@ > // to subsystem if none exists. > value = c.get_variable("device-name"); > if (value.length() == 0) > - string value = c.get_variable("subsystem"); > + value = c.get_variable("subsystem"); > if (Dflag) > fprintf(stderr, "Testing media type of %s against 0x%x\n", > value.c_str(), _type); > ------------------------------------------------------------------------------------------------ > > [http://www.totalterror.net/freebsd/devd.patch] > Thank you; this'll get committed shortly. Sam