Date: Wed, 19 Oct 2005 19:58:27 +0300 From: Niki Denev <nike_d@cytexbg.com> To: freebsd-current@freebsd.org Subject: Re: ath not setting media type? [SOLVED : devd is to blame] Message-ID: <200510191958.27827.nike_d@cytexbg.com> In-Reply-To: <4356129F.90602@cytexbg.com> References: <200510181233.47769.nike_d@cytexbg.com> <43554809.4060900@errno.com> <4356129F.90602@cytexbg.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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]
--
--niki
PGP KeyId: 0xF2DB7EB9
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
iD8DBQBDVnszHNAJ/fLbfrkRArsdAJ9JVpwKrBzLo4Bz3plUOjetLAM9GgCdH6kd
5FCF6wn7c8TrvQc5pKWOcSI=
=O58H
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510191958.27827.nike_d>
