summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2008-06-29 20:05:23 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2008-06-29 20:05:23 +0000
commite0d2d394f1411e106d3b85571b194aa5d484ddc6 (patch)
treec82491c621b09f2fd3bac39b36fc91e3eafa7e0d /sys/arch/sparc
parent22caf3c65af25d248b59eb929a57917fd6a6cabf (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/sparc')
-rw-r--r--sys/arch/sparc/sparc/disksubr.c7
1 files changed, 4 insertions, 3 deletions
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. */