summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/luna88k/luna88k/disksubr.c15
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);
}
}