diff options
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/db_disasm.c | 16 | ||||
-rw-r--r-- | sys/alpha/alpha/diskslice_machdep.c | 4 | ||||
-rw-r--r-- | sys/alpha/alpha/machdep.c | 6 | ||||
-rw-r--r-- | sys/alpha/alpha/trap.c | 4 | ||||
-rw-r--r-- | sys/alpha/pci/apecs.c | 4 | ||||
-rw-r--r-- | sys/alpha/pci/cia.c | 6 | ||||
-rw-r--r-- | sys/alpha/pci/lca.c | 4 | ||||
-rw-r--r-- | sys/alpha/tc/am7990.c | 5 | ||||
-rw-r--r-- | sys/alpha/tc/espvar.h | 5 | ||||
-rw-r--r-- | sys/alpha/tlsb/tlsb.c | 3 |
10 files changed, 29 insertions, 28 deletions
diff --git a/sys/alpha/alpha/db_disasm.c b/sys/alpha/alpha/db_disasm.c index bec6145..9fc3b1e 100644 --- a/sys/alpha/alpha/db_disasm.c +++ b/sys/alpha/alpha/db_disasm.c @@ -201,7 +201,7 @@ pal_opname(op) return (pal_op_tbl[i].name); } - sprintf(unk, "0x%x", op); + snprintf(unk, sizeof(unk), "0x%x", op); return (unk); } @@ -257,7 +257,7 @@ arit_name(op) if (name != NULL) return (name); - sprintf(unk, "?arit 0x%x?", op); + snprintf(unk, sizeof(unk), "?arit 0x%x?", op); return (unk); } @@ -307,7 +307,7 @@ logical_name(op) if (name != NULL) return (name); - sprintf(unk, "?logical 0x%x?", op); + snprintf(unk, sizeof(unk), "?logical 0x%x?", op); return (unk); } @@ -352,7 +352,7 @@ bitop_name(op) if (name != NULL) return (name); - sprintf(unk, "?bit 0x%x?", op); + snprintf(unk, sizeof(unk), "?bit 0x%x?", op); return (unk); } @@ -376,7 +376,7 @@ mul_name(op) if (name != NULL) return (name); - sprintf(unk, "?mul 0x%x?", op); + snprintf(unk, sizeof(unk), "?mul 0x%x?", op); return (unk); } @@ -401,7 +401,7 @@ special_name(op) if (name != NULL) return (name); - sprintf(unk, "?special 0x%x?", op); + snprintf(unk, sizeof(unk), "?special 0x%x?", op); return (unk); } @@ -440,7 +440,7 @@ intmisc_name(op) case op_ftois: return ("ftois"); } - sprintf(unk, "?intmisc 0x%x?", op); + snprintf(unk, sizeof(unk), "?intmisc 0x%x?", op); return (unk); } @@ -460,7 +460,7 @@ float_name(tbl, op, type) return (tbl[i].name); } - sprintf(unk, "?%s 0x%x?", type, op); + snprintf(unk, sizeof(unk), "?%s 0x%x?", type, op); return (unk); } diff --git a/sys/alpha/alpha/diskslice_machdep.c b/sys/alpha/alpha/diskslice_machdep.c index e58dfd5..426df40 100644 --- a/sys/alpha/alpha/diskslice_machdep.c +++ b/sys/alpha/alpha/diskslice_machdep.c @@ -36,7 +36,7 @@ * from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91 * from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $ * from: i386/isa Id: diskslice_machdep.c,v 1.31 1998/08/10 07:22:14 phk Exp - * $Id: diskslice_machdep.c,v 1.4 1998/10/06 08:38:58 dfr Exp $ + * $Id: diskslice_machdep.c,v 1.5 1998/10/16 10:13:09 jkh Exp $ */ #include <sys/param.h> @@ -421,7 +421,7 @@ extended(dname, dev, strat, lp, ssp, ext_offset, ext_size, base_ext_offset, sname = dsname(dname, dkunit(dev), WHOLE_DISK_SLICE, RAW_PART, partname); - strcpy(buf, sname); + snprintf(buf, sizeof(buf), "%s", sname); if (strlen(buf) < sizeof buf - 11) strcat(buf, "<extended>"); check_part(buf, dp, base_ext_offset, nsectors, diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 3f1890c..446ecec 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: machdep.c,v 1.24 1998/11/25 09:45:27 dfr Exp $ + * $Id: machdep.c,v 1.25 1998/12/04 10:52:47 dfr Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -484,7 +484,7 @@ alpha_unknown_sysname() { static char s[128]; /* safe size */ - sprintf(s, "%s family, unknown model variation 0x%lx", + snprintf(s, sizeof(s), "%s family, unknown model variation 0x%lx", platform.family, hwrpb->rpb_variation & SV_ST_MASK); return ((const char *)s); } @@ -676,7 +676,7 @@ alpha_init(pfn, ptb, bim, bip, biv) /* NOTREACHED */ } cpuinit[cputype].init(cputype); - strcpy(cpu_model, platform.model); + snprintf(cpu_model, sizeof(cpu_model), "%s", platform.model); /* * Initalize the real console, so the the bootstrap console is diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c index ffec15e..9d333c2 100644 --- a/sys/alpha/alpha/trap.c +++ b/sys/alpha/alpha/trap.c @@ -1,4 +1,4 @@ -/* $Id: trap.c,v 1.6 1998/11/18 23:51:40 dfr Exp $ */ +/* $Id: trap.c,v 1.7 1998/12/04 10:52:47 dfr Exp $ */ /* $NetBSD: trap.c,v 1.31 1998/03/26 02:21:46 thorpej Exp $ */ /* @@ -154,7 +154,7 @@ printtrap(a0, a1, a2, entry, framep, isfatal, user) entryname = "system call"; break; default: - sprintf(ubuf, "type %lx", entry); + snprintf(ubuf, sizeof(ubuf), "type %lx", entry); entryname = (const char *) ubuf; break; } diff --git a/sys/alpha/pci/apecs.c b/sys/alpha/pci/apecs.c index c8bbad7..d7f7b6e 100644 --- a/sys/alpha/pci/apecs.c +++ b/sys/alpha/pci/apecs.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: apecs.c,v 1.2 1998/10/06 14:18:40 dfr Exp $ + * $Id: apecs.c,v 1.3 1998/11/15 18:25:16 dfr Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -514,7 +514,7 @@ apecs_attach(device_t dev) set_iointr(alpha_dispatch_intr); - strcpy(chipset_type, "apecs"); + snprintf(chipset_type, sizeof(chipset_type), "apecs"); chipset_bwx = 0; chipset_ports = APECS_PCI_SIO; chipset_memory = APECS_PCI_SPARSE; diff --git a/sys/alpha/pci/cia.c b/sys/alpha/pci/cia.c index 41769ea..c68ef57 100644 --- a/sys/alpha/pci/cia.c +++ b/sys/alpha/pci/cia.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cia.c,v 1.12 1998/11/28 09:55:16 dfr Exp $ + * $Id: cia.c,v 1.13 1998/12/02 09:33:27 dfr Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -804,13 +804,13 @@ cia_attach(device_t dev) set_iointr(alpha_dispatch_intr); if (cia_ispyxis) { - strcpy(chipset_type, "pyxis"); + snprintf(chipset_type, sizeof(chipset_type), "pyxis"); chipset_bwx = 1; chipset_ports = CIA_EV56_BWIO; chipset_memory = CIA_EV56_BWMEM; chipset_dense = CIA_PCI_DENSE; } else { - strcpy(chipset_type, "cia"); + snprintf(chipset_type, sizeof(chipset_type), "cia"); chipset_bwx = 0; chipset_ports = CIA_PCI_SIO1; chipset_memory = CIA_PCI_SMEM1; diff --git a/sys/alpha/pci/lca.c b/sys/alpha/pci/lca.c index 5cf492f..f3b194d 100644 --- a/sys/alpha/pci/lca.c +++ b/sys/alpha/pci/lca.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: lca.c,v 1.3 1998/10/06 14:18:40 dfr Exp $ + * $Id: lca.c,v 1.4 1998/11/15 18:25:16 dfr Exp $ */ #include <sys/param.h> @@ -397,7 +397,7 @@ lca_attach(device_t dev) set_iointr(alpha_dispatch_intr); - strcpy(chipset_type, "lca"); + snprintf(chipset_type, sizeof(chipset_type), "lca"); chipset_bwx = 0; chipset_ports = LCA_PCI_SIO; chipset_memory = LCA_PCI_SPARSE; diff --git a/sys/alpha/tc/am7990.c b/sys/alpha/tc/am7990.c index 6c65f82..d734c15 100644 --- a/sys/alpha/tc/am7990.c +++ b/sys/alpha/tc/am7990.c @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: am7990.c,v 1.1 1998/08/20 08:27:10 dfr Exp $ */ /* $NetBSD: am7990.c,v 1.43 1998/03/29 22:36:42 mycroft Exp $ */ /*- @@ -194,7 +194,8 @@ am7990_config(sc) /* Make sure the chip is stopped. */ am7990_stop(sc); /* Initialize ifnet structure. */ - sprintf(sc->sc_dev.dv_xname, "le%d", sc->unit); + snprintf(sc->sc_dev.dv_xname, + sizeof(sc->sc_dev.dv_xname), "le%d", sc->unit); ifp->if_unit = sc->unit; ifp->if_name = "le"; ifp->if_softc = sc; diff --git a/sys/alpha/tc/espvar.h b/sys/alpha/tc/espvar.h index ad5d139..b64b774 100644 --- a/sys/alpha/tc/espvar.h +++ b/sys/alpha/tc/espvar.h @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: espvar.h,v 1.1 1998/08/20 08:27:10 dfr Exp $ */ /* $NetBSD: espvar.h,v 1.3.4.1 1996/09/10 17:28:18 cgd Exp $ */ /* @@ -74,8 +74,7 @@ struct ecb { #define ECB_TRACE(ecb, msg, a, b) do { \ const char *f = "[" msg "]"; \ int n = strlen((ecb)->trace); \ - if (n < (sizeof((ecb)->trace)-100)) \ - sprintf((ecb)->trace + n, f, a, b); \ + snprintf((ecb)->trace + n, sizeof((ecb)->trace) - n, f, a, b); \ } while(0) #else #define ECB_TRACE(ecb, msg, a, b) diff --git a/sys/alpha/tlsb/tlsb.c b/sys/alpha/tlsb/tlsb.c index 72cf93a..00aff9a 100644 --- a/sys/alpha/tlsb/tlsb.c +++ b/sys/alpha/tlsb/tlsb.c @@ -343,7 +343,8 @@ tlsb_node_type_str(u_int32_t dtype) default: bzero(tlsb_line, sizeof(tlsb_line)); - sprintf(tlsb_line, "unknown, dtype 0x%x", dtype); + snprintf(tlsb_line, sizeof(tlsb_line), + "unknown, dtype 0x%x", dtype); return (tlsb_line); } /* NOTREACHED */ |