diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-05 00:38:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-05 00:38:25 +0000 |
commit | 27424f98f99646fb8b3e4ef11652da62014a7ceb (patch) | |
tree | 47b5f078f236f633651ce1bad4b1228fac2f6d7d /sys/compat/linux/linux_hdio.c | |
parent | 91862e2af60dd7be0a8d86f5f3fe187dbb400d7f (diff) |
use six new macros to access & store the 48-bit disklabel fields related
to size. tested on almost all machines, double checked by miod and krw
next comes the type handling surrounding these values
Diffstat (limited to 'sys/compat/linux/linux_hdio.c')
-rw-r--r-- | sys/compat/linux/linux_hdio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_hdio.c b/sys/compat/linux/linux_hdio.c index 8e4704ccb40..4eb2edba747 100644 --- a/sys/compat/linux/linux_hdio.c +++ b/sys/compat/linux/linux_hdio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_hdio.c,v 1.5 2002/03/14 01:26:50 millert Exp $ */ +/* $OpenBSD: linux_hdio.c,v 1.6 2007/06/05 00:38:20 deraadt Exp $ */ /* $NetBSD: linux_hdio.c,v 1.1 2000/12/10 14:12:17 fvdl Exp $ */ /* @@ -130,7 +130,7 @@ linux_ioctl_hdio(struct proc *p, struct linux_sys_ioctl_args *uap, break; } labp = error != 0 ? &label : partp.disklab; - hdg.start = error1 != 0 ? partp.part->p_offset : 0; + hdg.start = error1 != 0 ? DL_GETPOFFSET(partp.part) & 0x7fffffff: 0; hdg.heads = labp->d_ntracks; hdg.cylinders = labp->d_ncylinders; hdg.sectors = labp->d_nsectors; @@ -148,7 +148,7 @@ linux_ioctl_hdio(struct proc *p, struct linux_sys_ioctl_args *uap, break; } labp = error != 0 ? &label : partp.disklab; - hdg_big.start = error1 != 0 ? partp.part->p_offset : 0; + hdg_big.start = error1 != 0 ? DL_GETPOFFSET(partp.part) & 0x7fffffff : 0; hdg_big.heads = labp->d_ntracks; hdg_big.cylinders = labp->d_ncylinders; hdg_big.sectors = labp->d_nsectors; |