From owner-freebsd-hackers Tue Nov 19 14:15:35 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1B6A37B401 for ; Tue, 19 Nov 2002 14:15:33 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 715B943E97 for ; Tue, 19 Nov 2002 14:15:33 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 61595 invoked by uid 1000); 19 Nov 2002 22:15:34 -0000 Date: Tue, 19 Nov 2002 14:15:34 -0800 (PST) From: Nate Lawson To: Brooks Davis Cc: hackers@FreeBSD.ORG Subject: Re: [brooks@one-eyed-alien.net: [PATCH] switching to if_xname] In-Reply-To: <20021119125107.A16432@Odin.AC.HMC.Edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 19 Nov 2002, Brooks Davis wrote: > On Fri, Nov 01, 2002 at 10:54:23AM -0800, Brooks Davis wrote: > > I'm trying to get some review for the following patch. I realize it's > > quite large, but most it is is trivial. The ipfw code is the only thing > > that worries me significantly. I have promised Kris that I will fix > > ports that break with this change so you don't need to worry about that > > issue. > > I've uploaded a new version of the patch addressing the concerns I've > heard to: > > http://people.freebsd.org/~brooks/patches/if_xname.diff Thanks for fixing things. Are all the uses of sprintf() below safe and intentional? sprintf(sc->sc_if.if_xname, "sl%d", unit); sprintf(sc->sc_if.if_xname, "sl%d", unit); sprintf(multicast_decap_if[s].if_xname, "mdecap%d", s); sprintf(ifp->if_xname, "get%d", device_get_unit(sc->sc_dev)); sprintf(ifp->if_xname, "%s%d", iedriver.name, unit); sprintf(ifp->if_xname, "lp%d", device_get_unit(dev)); sprintf(ifp->if_xname, "sbni%d", unit); sprintf(ifp->if_xname, "sn%d", device_get_unit(dev)); sprintf(ifp->if_xname, "aue%d", sc->aue_unit); sprintf(ifp->if_xname, "cue%d", sc->cue_unit); sprintf(ifp->if_xname, "kue%d", sc->kue_unit); sprintf(ifp->if_xname, "wl%d", id->id_unit); sprintf(c->ifp->if_xname, "cx%d", u); sprintf(sc->le_if.if_xname, "%s%d", ledriver.name, dvp->id_unit); sprintf(ifp->if_xname, "rdp%d", unit); sprintf(sc->sc_if.if_xname, "ipr%d", i); sprintf(sc->sc_if.if_xname, "isp%d", sc->sc_unit); sprintf(ifp->if_xname, "%s%d", NG_EIFACE_EIFACE_NAME, priv->unit); sprintf(ifname, "if%s", ifp->if_xname); (void) sprintf(ifp->if_xname, "%s%d", NG_IFACE_IFACE_NAME, priv->unit); sprintf(ifp->if_xname, "ipxip%d", ipxipif_units); sprintf(ifp->if_xname, "ipxip%d", ipxipif_units++); sprintf(sc->tulip_xname, "de%d", sc->tulip_unit); -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message