Date: Mon, 29 Jul 2002 22:38:34 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: brooks@one-eyed-alien.net Cc: net@FreeBSD.ORG Subject: Re: switching to if_xname from if_name and if_unit Message-ID: <20020729.223834.32171634.imp@bsdimp.com> In-Reply-To: <20020726211050.A30598@Odin.AC.HMC.Edu> References: <20020726211050.A30598@Odin.AC.HMC.Edu>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20020726211050.A30598@Odin.AC.HMC.Edu> Brooks Davis <brooks@one-eyed-alien.net> writes: : [Bcc to -arch for interested people not on -net] : : NetBSD and OpenBSD have replaced the "char *if_name" and "int if_unit" : members of struct ifnet with "char if_xname[IFNAMESIZ]". I propose that : we follow suit. I like this. : @@ -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? Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020729.223834.32171634.imp>