Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Nov 2002 14:15:34 -0800 (PST)
From:      Nate Lawson <nate@root.org>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: [brooks@one-eyed-alien.net: [PATCH] switching to if_xname]
Message-ID:  <Pine.BSF.4.21.0211191412280.61484-100000@root.org>
In-Reply-To: <20021119125107.A16432@Odin.AC.HMC.Edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0211191412280.61484-100000>