diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hp300/dev/hd.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/dev/sd.c | 12 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/disksubr.c | 10 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/disksubr.c | 10 | ||||
-rw-r--r-- | sys/dev/ata/wd.c | 8 | ||||
-rw-r--r-- | sys/dev/isa/fd.c | 6 | ||||
-rw-r--r-- | sys/dev/isa/mcd.c | 6 |
7 files changed, 28 insertions, 28 deletions
diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c index 480af3eac60..0867e7948f3 100644 --- a/sys/arch/hp300/dev/hd.c +++ b/sys/arch/hp300/dev/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.21 2003/04/06 03:02:43 krw Exp $ */ +/* $OpenBSD: hd.c,v 1.22 2003/04/06 15:28:25 krw Exp $ */ /* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */ /* @@ -489,7 +489,7 @@ hdgetinfo(dev, rs, lp, spoofonly) lp->d_type = DTYPE_HPIB; strncpy(lp->d_typename, hdidentinfo[rs->sc_type].ri_desc, sizeof(lp->d_typename)); - strcpy(lp->d_packname, "fictitious"); + strncpy(lp->d_packname, "fictitious", sizeof lp->d_packname); lp->d_secsize = DEV_BSIZE; lp->d_rpm = 3600; lp->d_interleave = 1; diff --git a/sys/arch/hp300/dev/sd.c b/sys/arch/hp300/dev/sd.c index 2589175dd23..fda61269fbc 100644 --- a/sys/arch/hp300/dev/sd.c +++ b/sys/arch/hp300/dev/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.28 2002/12/25 20:56:59 miod Exp $ */ +/* $OpenBSD: sd.c,v 1.29 2003/04/06 15:28:25 krw Exp $ */ /* $NetBSD: sd.c,v 1.34 1997/07/10 18:14:10 kleink Exp $ */ /* @@ -446,20 +446,20 @@ sdgetinfo(dev, sc, lp, spoofonly) switch (sc->sc_type) { case 4: - strcpy(lp->d_typename, "SCSI WORM"); + strncpy(lp->d_typename, "SCSI WORM", sizeof lp->d_typename); break; case 5: - strcpy(lp->d_typename, "SCSI CD-ROM"); + strncpy(lp->d_typename, "SCSI CD-ROM", sizeof lp->d_typename); break; case 7: - strcpy(lp->d_typename, "SCSI optical"); + strncpy(lp->d_typename, "SCSI optical", sizeof lp->d_typename); break; default: - strcpy(lp->d_typename, "SCSI disk"); + strncpy(lp->d_typename, "SCSI disk", sizeof lp->d_typename); break; } lp->d_type = DTYPE_SCSI; - strcpy(lp->d_packname, "fictitious"); + strncpy(lp->d_packname, "fictitious", sizeof lp->d_packname); lp->d_secsize = sc->sc_blksize; lp->d_secpercyl = lp->d_nsectors * lp->d_ntracks; lp->d_rpm = 3600; diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c index c3f74d139b4..a7678e32536 100644 --- a/sys/arch/mvme68k/mvme68k/disksubr.c +++ b/sys/arch/mvme68k/mvme68k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.26 2002/08/21 18:59:05 miod Exp $ */ +/* $OpenBSD: disksubr.c,v 1.27 2003/04/06 15:28:26 krw Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -545,8 +545,8 @@ cputobsdlabel(lp, clp) lp->d_magic = clp->magic1; lp->d_type = clp->type; lp->d_subtype = clp->subtype; - strncpy(lp->d_typename, clp->vid_vd, 16); - strncpy(lp->d_packname, clp->packname, 16); + strncpy(lp->d_typename, clp->vid_vd, sizeof lp->d_typename); + strncpy(lp->d_packname, clp->packname, sizeof lp->d_packname); lp->d_secsize = clp->cfg_psm; lp->d_nsectors = clp->cfg_spt; lp->d_ncylinders = clp->cfg_trk; /* trk is really num of cyl! */ @@ -609,8 +609,8 @@ cputobsdlabel(lp, clp) lp->d_magic = clp->magic1; lp->d_type = clp->type; lp->d_subtype = clp->subtype; - strncpy(lp->d_typename, clp->vid_vd, 16); - strncpy(lp->d_packname, clp->packname, 16); + strncpy(lp->d_typename, clp->vid_vd, sizeof lp->d_typename); + strncpy(lp->d_packname, clp->packname, sizeof lp->d_packname); lp->d_secsize = clp->cfg_psm; lp->d_nsectors = clp->cfg_spt; lp->d_ncylinders = clp->cfg_trk; /* trk is really num of cyl! */ diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c index 3786c5fee6e..a88d175bf55 100644 --- a/sys/arch/mvme88k/mvme88k/disksubr.c +++ b/sys/arch/mvme88k/mvme88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.18 2003/04/06 03:02:44 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.19 2003/04/06 15:28:26 krw Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -602,8 +602,8 @@ cputobsdlabel(lp, clp) lp->d_magic = clp->magic1; lp->d_type = clp->type; lp->d_subtype = clp->subtype; - strncpy(lp->d_typename, clp->vid_vd, 16); - strncpy(lp->d_packname, clp->packname, 16); + strncpy(lp->d_typename, clp->vid_vd, sizeof lp->d_typename); + strncpy(lp->d_packname, clp->packname, sizeof lp->d_packname); lp->d_secsize = clp->cfg_psm; lp->d_nsectors = clp->cfg_spt; lp->d_ncylinders = clp->cfg_trk; /* trk is really num of cyl! */ @@ -666,8 +666,8 @@ cputobsdlabel(lp, clp) lp->d_magic = clp->magic1; lp->d_type = clp->type; lp->d_subtype = clp->subtype; - strncpy(lp->d_typename, clp->vid_vd, 16); - strncpy(lp->d_packname, clp->packname, 16); + strncpy(lp->d_typename, clp->vid_vd, sizeof lp->d_typename); + strncpy(lp->d_packname, clp->packname, sizeof lp->d_packname); lp->d_secsize = clp->cfg_psm; lp->d_nsectors = clp->cfg_spt; lp->d_ncylinders = clp->cfg_trk; /* trk is really num of cyl! */ diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 49eb0199795..f5c52ef6845 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.27 2003/02/21 20:10:33 grange Exp $ */ +/* $OpenBSD: wd.c,v 1.28 2003/04/06 15:28:25 krw Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -864,13 +864,13 @@ wdgetdefaultlabel(wd, lp) lp->d_secpercyl = lp->d_ntracks * lp->d_nsectors; if (wd->drvp->ata_vers == -1) { lp->d_type = DTYPE_ST506; - strncpy(lp->d_typename, "ST506/MFM/RLL", 16); + strncpy(lp->d_typename, "ST506/MFM/RLL", sizeof lp->d_typename); } else { lp->d_type = DTYPE_ESDI; - strncpy(lp->d_typename, "ESDI/IDE disk", 16); + strncpy(lp->d_typename, "ESDI/IDE disk", sizeof lp->d_typename); } /* XXX - user viscopy() like sd.c */ - strncpy(lp->d_packname, wd->sc_params.atap_model, 16); + strncpy(lp->d_packname, wd->sc_params.atap_model, sizeof lp->d_packname); lp->d_secperunit = wd->sc_capacity; lp->d_rpm = 3600; lp->d_interleave = 1; diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index 3b371f21324..039e11cdc77 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.45 2002/05/24 13:31:10 art Exp $ */ +/* $OpenBSD: fd.c,v 1.46 2003/04/06 15:28:25 krw Exp $ */ /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */ /*- @@ -987,9 +987,9 @@ fdioctl(dev, cmd, addr, flag, p) lp->d_nsectors = fd->sc_type->sectrac; lp->d_ncylinders = fd->sc_type->tracks; - strncpy(lp->d_typename, "floppy disk", 16); + strncpy(lp->d_typename, "floppy disk", sizeof lp->d_typename); lp->d_type = DTYPE_FLOPPY; - strncpy(lp->d_packname, "fictitious", 16); + strncpy(lp->d_packname, "fictitious", sizeof lp->d_packname); lp->d_secperunit = fd->sc_type->size; lp->d_rpm = 300; lp->d_interleave = 1; diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index 898dafba85c..e8f3a57205a 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcd.c,v 1.31 2002/05/24 13:31:11 art Exp $ */ +/* $OpenBSD: mcd.c,v 1.32 2003/04/06 15:28:25 krw Exp $ */ /* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */ /* @@ -738,9 +738,9 @@ mcdgetdisklabel(dev, sc, lp, clp, spoofonly) /* as long as it's not 0 - readdisklabel divides by it */ } - strncpy(lp->d_typename, "Mitsumi CD-ROM", 16); + strncpy(lp->d_typename, "Mitsumi CD-ROM", sizeof lp->d_typename); lp->d_type = DTYPE_SCSI; /* XXX */ - strncpy(lp->d_packname, "fictitious", 16); + strncpy(lp->d_packname, "fictitious", sizeof lp->d_packname); lp->d_secperunit = sc->disksize; lp->d_rpm = 300; lp->d_interleave = 1; |