diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-08-25 10:50:56 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-08-25 10:50:56 +0000 |
commit | 01cb4b7be751fece371f468c3391b4b756342ccf (patch) | |
tree | c7fce942ced3c38b15f8f449d0b969cca0a5111a /sys | |
parent | c4038f6b78b5334a479aa2e2633e2ff908cafdee (diff) |
Do not require that `extra' partitions (i-p) start on cylinder boundaries;
this was inherited from sparc when adding 16 partition support, but
disklabel(8) does not enforce such alignment, and since UniOS never did
for the `traditional' partitions (a-h), there is no good reason to keep this.
This makes partitions i-p really functional.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/luna88k/luna88k/disksubr.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/arch/luna88k/luna88k/disksubr.c b/sys/arch/luna88k/luna88k/disksubr.c index cd298887cc9..74eca5615bd 100644 --- a/sys/arch/luna88k/luna88k/disksubr.c +++ b/sys/arch/luna88k/luna88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.54 2013/06/11 16:42:09 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.55 2013/08/25 10:50:55 miod Exp $ */ /* $NetBSD: disksubr.c,v 1.12 2002/02/19 17:09:44 wiz Exp $ */ /* @@ -291,10 +291,7 @@ disklabel_om_to_bsd(struct sun_disklabel *sl, struct disklabel *lp) spp = &sl->sl_part[i]; npp = &lp->d_partitions[i]; /* UniOS label uses blkoffset, not cyloffset */ - if (sl->sl_rpm == 0) - DL_SETPOFFSET(npp, spp->sdkp_cyloffset); - else - DL_SETPOFFSET(npp, spp->sdkp_cyloffset * secpercyl); + DL_SETPOFFSET(npp, spp->sdkp_cyloffset); DL_SETPSIZE(npp, spp->sdkp_nsectors); if (DL_GETPSIZE(npp) == 0) { npp->p_fstype = FS_UNUSED; @@ -347,8 +344,7 @@ disklabel_om_to_bsd(struct sun_disklabel *sl, struct disklabel *lp) for (i = 0; i < SUNXPART; i++) { spp = &sl->sl_xpart[i]; npp = &lp->d_partitions[i+8]; - /* no need to be UniOS compatible here */ - DL_SETPOFFSET(npp, spp->sdkp_cyloffset * secpercyl); + DL_SETPOFFSET(npp, spp->sdkp_cyloffset); DL_SETPSIZE(npp, spp->sdkp_nsectors); if (DL_GETPSIZE(npp) == 0) { npp->p_fstype = FS_UNUSED; @@ -427,10 +423,7 @@ disklabel_bsd_to_om(struct disklabel *lp, struct sun_disklabel *sl) spp->sdkp_cyloffset = 0; spp->sdkp_nsectors = 0; if (DL_GETPSIZE(npp)) { - /* no need to be UniOS compatible here */ - if (DL_GETPOFFSET(npp) % secpercyl) - return (EINVAL); - spp->sdkp_cyloffset = DL_GETPOFFSET(npp) / secpercyl; + spp->sdkp_cyloffset = DL_GETPOFFSET(npp); spp->sdkp_nsectors = DL_GETPSIZE(npp); } } |