summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/macppc/macppc/autoconf.c6
-rw-r--r--sys/arch/sparc/sparc/cpu.c6
-rw-r--r--sys/arch/sparc64/dev/cbus.c4
-rw-r--r--sys/arch/sparc64/dev/central.c4
-rw-r--r--sys/arch/sparc64/dev/ebus_mainbus.c4
-rw-r--r--sys/arch/sparc64/dev/fhc.c4
-rw-r--r--sys/arch/sparc64/dev/sbus.c5
-rw-r--r--sys/arch/sparc64/dev/upa.c5
-rw-r--r--sys/arch/sparc64/dev/vbus.c4
9 files changed, 20 insertions, 22 deletions
diff --git a/sys/arch/macppc/macppc/autoconf.c b/sys/arch/macppc/macppc/autoconf.c
index cd083d973bb..238fc7752ce 100644
--- a/sys/arch/macppc/macppc/autoconf.c
+++ b/sys/arch/macppc/macppc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.38 2009/10/01 20:19:18 kettenis Exp $ */
+/* $OpenBSD: autoconf.c,v 1.39 2010/11/11 17:58:21 miod Exp $ */
/*
* Copyright (c) 1996, 1997 Per Fogelstrom
* Copyright (c) 1995 Theo de Raadt
@@ -37,7 +37,7 @@
* from: Utah Hdr: autoconf.c 1.31 91/01/21
*
* from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93
- * $Id: autoconf.c,v 1.38 2009/10/01 20:19:18 kettenis Exp $
+ * $Id: autoconf.c,v 1.39 2010/11/11 17:58:21 miod Exp $
*/
/*
@@ -184,7 +184,7 @@ makebootdev(char *bp)
} while((dp->type & T_IFACE) == 0);
if (dp->att && dp->type == T_IFACE) {
- snprintf(bootdev, sizeof bootdev, "%s", dp->dev);
+ strlcpy(bootdev, dp->dev, sizeof bootdev);
return;
}
dev = dp->dev;
diff --git a/sys/arch/sparc/sparc/cpu.c b/sys/arch/sparc/sparc/cpu.c
index 983cccd6e69..628ab52cda2 100644
--- a/sys/arch/sparc/sparc/cpu.c
+++ b/sys/arch/sparc/sparc/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.47 2010/07/10 19:32:24 miod Exp $ */
+/* $OpenBSD: cpu.c,v 1.48 2010/11/11 17:58:23 miod Exp $ */
/* $NetBSD: cpu.c,v 1.56 1997/09/15 20:52:36 pk Exp $ */
/*
@@ -741,8 +741,8 @@ sun4_hotfix(sc)
{
if ((sc->flags & CPUFLG_SUN4CACHEBUG) != 0) {
kvm_uncache((caddr_t)trapbase, 1);
- snprintf(cpu_hotfix, sizeof cpu_hotfix,
- "cache chip bug - trap page uncached");
+ strlcpy(cpu_hotfix, "cache chip bug - trap page uncached",
+ sizeof cpu_hotfix);
}
}
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;