diff options
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r-- | sys/arch/mvme68k/mvme68k/disksubr.c | 10 |
1 files changed, 5 insertions, 5 deletions
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! */ |