diff options
Diffstat (limited to 'sys')
-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 | ||||
-rw-r--r-- | sys/dev/vnd.c | 4 |
4 files changed, 13 insertions, 11 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. */ diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index c80ba5c5199..8d3d79cfadc 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.85 2008/03/24 01:16:58 krw Exp $ */ +/* $OpenBSD: vnd.c,v 1.86 2008/06/29 20:05:22 krw Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -305,7 +305,7 @@ vndgetdisklabel(dev_t dev, struct vnd_softc *sc, struct disklabel *lp, bzero(lp, sizeof(struct disklabel)); - lp->d_secsize = 512; + lp->d_secsize = DEV_BSIZE; lp->d_ntracks = 1; lp->d_nsectors = 100; lp->d_ncylinders = sc->sc_size / 100; |