From owner-freebsd-current@FreeBSD.ORG Wed Oct 19 16:58:36 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 92DC716A420 for ; Wed, 19 Oct 2005 16:58:36 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: from office.suresupport.com (office.suresupport.com [213.145.98.15]) by mx1.FreeBSD.org (Postfix) with SMTP id 07B4343D73 for ; Wed, 19 Oct 2005 16:58:29 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: (qmail 66836 invoked by uid 1026); 19 Oct 2005 17:02:49 -0000 Received: from 213.145.98.14 by office.suresupport.com (envelope-from , uid 1004) with qmail-scanner-1.23 (f-prot: 4.4.2/3.14.11. Clear:RC:1(213.145.98.14):. Processed in 0.091168 secs); 19 Oct 2005 17:02:49 -0000 Received: from unknown (HELO 14.98.145.213.in-addr.arpa) (213.145.98.14) by office.suresupport.com with SMTP; 19 Oct 2005 17:02:49 -0000 From: Niki Denev To: freebsd-current@freebsd.org Date: Wed, 19 Oct 2005 19:58:27 +0300 User-Agent: KMail/1.8 References: <200510181233.47769.nike_d@cytexbg.com> <43554809.4060900@errno.com> <4356129F.90602@cytexbg.com> In-Reply-To: <4356129F.90602@cytexbg.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1229432.ppm0dL0cOZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510191958.27827.nike_d@cytexbg.com> Cc: 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 16:58:36 -0000 --nextPart1229432.ppm0dL0cOZ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=20 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 : =2D------------------------------------------------------------------------= =2D---------------------- =2D-- 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 =3D c.get_variable("device-name"); if (value.length() =3D=3D 0) =2D string value =3D c.get_variable("subsystem"); + value =3D c.get_variable("subsystem"); if (Dflag) fprintf(stderr, "Testing media type of %s against 0x%x\n", value.c_str(), _type); =2D------------------------------------------------------------------------= =2D---------------------- [http://www.totalterror.net/freebsd/devd.patch] =2D-=20 =2D-niki PGP KeyId: 0xF2DB7EB9 --nextPart1229432.ppm0dL0cOZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBDVnszHNAJ/fLbfrkRArsdAJ9JVpwKrBzLo4Bz3plUOjetLAM9GgCdH6kd 5FCF6wn7c8TrvQc5pKWOcSI= =O58H -----END PGP SIGNATURE----- --nextPart1229432.ppm0dL0cOZ--