Date: Tue, 30 Jul 2002 10:15:33 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: "M. Warner Losh" <imp@bsdimp.com> Cc: brooks@one-eyed-alien.net, net@FreeBSD.ORG Subject: Re: switching to if_xname from if_name and if_unit Message-ID: <20020730101533.A29988@Odin.AC.HMC.Edu> In-Reply-To: <20020729.223834.32171634.imp@bsdimp.com>; from imp@bsdimp.com on Mon, Jul 29, 2002 at 10:38:34PM -0600 References: <20020726211050.A30598@Odin.AC.HMC.Edu> <20020729.223834.32171634.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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? Yes, that's probably better. At least it's one less place that needs to know the name of the device. -- 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 iD8DBQE9Rsm0XY6L6fI4GtQRAhSCAKCUyjQjEctl0Xgn6WlQf4uh+bNqpACaA6QT haiG0YZwLF8zgxWWb+hyDfc= =p7Ge -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020730101533.A29988>
