diff options
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/dev/cbus.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/central.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/ebus_mainbus.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/fhc.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/sbus.c | 5 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/upa.c | 5 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/vbus.c | 4 |
7 files changed, 14 insertions, 16 deletions
diff --git a/sys/arch/sparc64/dev/cbus.c b/sys/arch/sparc64/dev/cbus.c index 8c44e0b2bc8..999abfc4cbe 100644 --- a/sys/arch/sparc64/dev/cbus.c +++ b/sys/arch/sparc64/dev/cbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cbus.c,v 1.7 2009/12/14 16:06:35 kettenis Exp $ */ +/* $OpenBSD: cbus.c,v 1.8 2010/11/11 17:58:23 miod Exp $ */ /* * Copyright (c) 2008 Mark Kettenis * @@ -220,7 +220,7 @@ cbus_alloc_bus_tag(struct cbus_softc *sc, bus_space_tag_t parent) if (bt == NULL) panic("could not allocate cbus bus tag"); - snprintf(bt->name, sizeof(bt->name), "%s", sc->sc_dv.dv_xname); + strlcpy(bt->name, sc->sc_dv.dv_xname, sizeof(bt->name)); bt->cookie = sc; bt->parent = parent; bt->asi = parent->asi; diff --git a/sys/arch/sparc64/dev/central.c b/sys/arch/sparc64/dev/central.c index 2562aa10d18..764d01e2aa4 100644 --- a/sys/arch/sparc64/dev/central.c +++ b/sys/arch/sparc64/dev/central.c @@ -1,4 +1,4 @@ -/* $OpenBSD: central.c,v 1.6 2008/01/17 22:53:18 kettenis Exp $ */ +/* $OpenBSD: central.c,v 1.7 2010/11/11 17:58:23 miod Exp $ */ /* * Copyright (c) 2004 Jason L. Wright (jason@thought.net) @@ -154,7 +154,7 @@ central_alloc_bus_tag(struct central_softc *sc) if (bt == NULL) panic("central: couldn't alloc bus tag"); - snprintf(bt->name, sizeof(bt->name), "%s", sc->sc_dv.dv_xname); + strlcpy(bt->name, sc->sc_dv.dv_xname, sizeof(bt->name)); bt->cookie = sc; bt->parent = sc->sc_bt; bt->asi = bt->parent->asi; diff --git a/sys/arch/sparc64/dev/ebus_mainbus.c b/sys/arch/sparc64/dev/ebus_mainbus.c index 82e5d91b562..7b14a60537b 100644 --- a/sys/arch/sparc64/dev/ebus_mainbus.c +++ b/sys/arch/sparc64/dev/ebus_mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ebus_mainbus.c,v 1.6 2008/04/03 19:41:20 kettenis Exp $ */ +/* $OpenBSD: ebus_mainbus.c,v 1.7 2010/11/11 17:58:23 miod Exp $ */ /* * Copyright (c) 2007 Mark Kettenis @@ -176,7 +176,7 @@ ebus_alloc_bus_tag(struct ebus_softc *sc, bus_space_tag_t parent) if (bt == NULL) panic("could not allocate ebus bus tag"); - snprintf(bt->name, sizeof(bt->name), "%s", sc->sc_dev.dv_xname); + strlcpy(bt->name, sc->sc_dev.dv_xname, sizeof(bt->name)); bt->cookie = sc; bt->parent = parent; bt->asi = parent->asi; diff --git a/sys/arch/sparc64/dev/fhc.c b/sys/arch/sparc64/dev/fhc.c index 2aef68cc418..1006bce15a5 100644 --- a/sys/arch/sparc64/dev/fhc.c +++ b/sys/arch/sparc64/dev/fhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fhc.c,v 1.16 2008/03/09 13:27:47 kettenis Exp $ */ +/* $OpenBSD: fhc.c,v 1.17 2010/11/11 17:58:23 miod Exp $ */ /* * Copyright (c) 2004 Jason L. Wright (jason@thought.net) @@ -174,7 +174,7 @@ fhc_alloc_bus_tag(struct fhc_softc *sc) if (bt == NULL) panic("fhc: couldn't alloc bus tag"); - snprintf(bt->name, sizeof(bt->name), "%s", sc->sc_dv.dv_xname); + strlcpy(bt->name, sc->sc_dv.dv_xname, sizeof(bt->name)); bt->cookie = sc; bt->parent = sc->sc_bt; bt->asi = bt->parent->asi; diff --git a/sys/arch/sparc64/dev/sbus.c b/sys/arch/sparc64/dev/sbus.c index d97d144806f..153fd547bc9 100644 --- a/sys/arch/sparc64/dev/sbus.c +++ b/sys/arch/sparc64/dev/sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sbus.c,v 1.37 2009/01/14 20:35:42 miod Exp $ */ +/* $OpenBSD: sbus.c,v 1.38 2010/11/11 17:58:23 miod Exp $ */ /* $NetBSD: sbus.c,v 1.46 2001/10/07 20:30:41 eeh Exp $ */ /*- @@ -776,8 +776,7 @@ sbus_alloc_bustag(struct sbus_softc *sc, int indirect) if (sbt == NULL) return (NULL); - snprintf(sbt->name, sizeof(sbt->name), "%s", - sc->sc_dev.dv_xname); + strlcpy(sbt->name, sc->sc_dev.dv_xname, sizeof(sbt->name)); sbt->cookie = sc; if (indirect) sbt->parent = sc->sc_bustag->parent; diff --git a/sys/arch/sparc64/dev/upa.c b/sys/arch/sparc64/dev/upa.c index dd07947b313..a6156a459cb 100644 --- a/sys/arch/sparc64/dev/upa.c +++ b/sys/arch/sparc64/dev/upa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: upa.c,v 1.8 2008/01/17 22:53:18 kettenis Exp $ */ +/* $OpenBSD: upa.c,v 1.9 2010/11/11 17:58:23 miod Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -159,8 +159,7 @@ upa_alloc_bus_tag(struct upa_softc *sc) if (bt == NULL) panic("upa: couldn't alloc bus tag"); - snprintf(bt->name, sizeof(bt->name), "%s", - sc->sc_dev.dv_xname); + strlcpy(bt->name, sc->sc_dev.dv_xname, sizeof(bt->name)); bt->cookie = sc; bt->parent = sc->sc_bt; bt->asi = bt->parent->asi; diff --git a/sys/arch/sparc64/dev/vbus.c b/sys/arch/sparc64/dev/vbus.c index 79d5963cf73..785ab7e2e7d 100644 --- a/sys/arch/sparc64/dev/vbus.c +++ b/sys/arch/sparc64/dev/vbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vbus.c,v 1.4 2008/12/30 21:23:33 kettenis Exp $ */ +/* $OpenBSD: vbus.c,v 1.5 2010/11/11 17:58:23 miod Exp $ */ /* * Copyright (c) 2008 Mark Kettenis * @@ -235,7 +235,7 @@ vbus_alloc_bus_tag(struct vbus_softc *sc, bus_space_tag_t parent) if (bt == NULL) panic("could not allocate vbus bus tag"); - snprintf(bt->name, sizeof(bt->name), "%s", sc->sc_dv.dv_xname); + strlcpy(bt->name, sc->sc_dv.dv_xname, sizeof(bt->name)); bt->cookie = sc; bt->parent = parent; bt->asi = parent->asi; |