diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-06-29 20:05:23 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-06-29 20:05:23 +0000 |
commit | e0d2d394f1411e106d3b85571b194aa5d484ddc6 (patch) | |
tree | c82491c621b09f2fd3bac39b36fc91e3eafa7e0d /sys/arch | |
parent | 22caf3c65af25d248b59eb929a57917fd6a6cabf (diff) |
Use DEV_BSIZE (defined as 512) instead of 512 when initializing the
disklabel's d_secsize.
ok millert@ marco@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/luna88k/luna88k/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/disksubr.c | 7 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/disksubr.c | 7 |
3 files changed, 11 insertions, 9 deletions
diff --git a/sys/arch/luna88k/luna88k/disksubr.c b/sys/arch/luna88k/luna88k/disksubr.c index f95dd05180f..44b5b849cbb 100644 --- a/sys/arch/luna88k/luna88k/disksubr.c +++ b/sys/arch/luna88k/luna88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.36 2008/06/12 06:58:35 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.37 2008/06/29 20:05:22 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.12 2002/02/19 17:09:44 wiz Exp $ */ /* @@ -252,7 +252,7 @@ disklabel_om_to_bsd(struct sun_disklabel *sl, struct disklabel *lp) lp->d_flags = D_VENDOR; memcpy(lp->d_packname, sl->sl_text, sizeof(lp->d_packname)); - lp->d_secsize = 512; + lp->d_secsize = DEV_BSIZE; lp->d_nsectors = sl->sl_nsectors; lp->d_ntracks = sl->sl_ntracks; lp->d_ncylinders = sl->sl_ncylinders; @@ -328,7 +328,7 @@ disklabel_bsd_to_om(struct disklabel *lp, struct sun_disklabel *sl) int i; u_short cksum, *sp1, *sp2; - if (lp->d_secsize != 512) + if (lp->d_secsize != DEV_BSIZE) return (EINVAL); /* Format conversion. */ diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c index 51fa9e50246..3b995f567d9 100644 --- a/sys/arch/sparc/sparc/disksubr.c +++ b/sys/arch/sparc/sparc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.75 2008/06/12 06:58:37 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.76 2008/06/29 20:05:22 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */ /* @@ -257,7 +257,7 @@ disklabel_sun_to_bsd(struct sun_disklabel *sl, struct disklabel *lp) lp->d_flags = D_VENDOR; memcpy(lp->d_packname, sl->sl_text, sizeof(lp->d_packname)); - lp->d_secsize = 512; + lp->d_secsize = DEV_BSIZE; lp->d_nsectors = sl->sl_nsectors; lp->d_ntracks = sl->sl_ntracks; lp->d_ncylinders = sl->sl_ncylinders; @@ -402,7 +402,8 @@ disklabel_bsd_to_sun(struct disklabel *lp, struct sun_disklabel *sl) u_short cksum, *sp1, *sp2; /* Enforce preconditions */ - if (lp->d_secsize != 512 || lp->d_nsectors == 0 || lp->d_ntracks == 0) + if (lp->d_secsize != DEV_BSIZE || lp->d_nsectors == 0 || + lp->d_ntracks == 0) return (EINVAL); /* Format conversion. */ diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c index 8796a0831c3..08f6448128a 100644 --- a/sys/arch/sparc64/sparc64/disksubr.c +++ b/sys/arch/sparc64/sparc64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.51 2008/06/12 06:58:37 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.52 2008/06/29 20:05:22 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */ /* @@ -250,7 +250,7 @@ disklabel_sun_to_bsd(struct sun_disklabel *sl, struct disklabel *lp) lp->d_flags = D_VENDOR; memcpy(lp->d_packname, sl->sl_text, sizeof(lp->d_packname)); - lp->d_secsize = 512; + lp->d_secsize = DEV_BSIZE; lp->d_nsectors = sl->sl_nsectors; lp->d_ntracks = sl->sl_ntracks; lp->d_ncylinders = sl->sl_ncylinders; @@ -395,7 +395,8 @@ disklabel_bsd_to_sun(struct disklabel *lp, struct sun_disklabel *sl) u_short cksum, *sp1, *sp2; /* Enforce preconditions */ - if (lp->d_secsize != 512 || lp->d_nsectors == 0 || lp->d_ntracks == 0) + if (lp->d_secsize != DEV_BSIZE || lp->d_nsectors == 0 || + lp->d_ntracks == 0) return (EINVAL); /* Format conversion. */ |