Date: Tue, 30 Jul 2002 11:30:44 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: Bruce Evans <bde@zeta.org.au> Cc: Brooks Davis <brooks@one-eyed-alien.net>, "M. Warner Losh" <imp@bsdimp.com>, net@FreeBSD.ORG Subject: Re: switching to if_xname from if_name and if_unit Message-ID: <20020730113044.A7396@Odin.AC.HMC.Edu> In-Reply-To: <20020731041621.H56544-100000@gamplex.bde.org>; from bde@zeta.org.au on Wed, Jul 31, 2002 at 04:22:23AM %2B1000 References: <20020730101533.A29988@Odin.AC.HMC.Edu> <20020731041621.H56544-100000@gamplex.bde.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Wed, Jul 31, 2002 at 04:22:23AM +1000, Bruce Evans wrote: > On Tue, 30 Jul 2002, Brooks Davis wrote: > > > On Mon, Jul 29, 2002 at 10:38:34PM -0600, M. Warner Losh wrote: > > > : @@ -280,8 +280,7 @@ ep_attach(sc) > > > : attached = (ifp->if_softc != 0); > > > : > > > : ifp->if_softc = sc; > > > : - ifp->if_unit = sc->unit; > > > : - ifp->if_name = "ep"; > > > : + sprintf(ifp->if_xname, "ep%d", sc->unit); > > > > > > strcpy(ifp->if_xname, device_get_name(sc->dev)); > > > > > > might be better, don't you think? > > I think this point has already been covered better by noticing that the > name is already stored in several other places (not just new-bus). I don't think it's stored elsewhere for pure pseudo interfaces like lo or gif though (except as "if_<name>" in the module decleration.) I don't see name that is consistantly associated with all interfaces. -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9RttSXY6L6fI4GtQRAkyDAJ9JGduPObE6Mz6WXrMQneL7iCs+agCeLtGU qTo6lhZgJt4VDZZXP0DGkOc= =1Lj8 -----END PGP SIGNATURE-----home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020730113044.A7396>
