summaryrefslogtreecommitdiff
path: root/sys/arch/socppc
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2013-11-05 00:51:59 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2013-11-05 00:51:59 +0000
commit796d477c0b5f03d8d84b1697382465b7555e5c98 (patch)
tree0522f4b0c219b74af4f5e76a0fc813a809442abc /sys/arch/socppc
parent1de8989a1b132480cf21105d5617b5ca6325daa0 (diff)
Replace direct references to p_size, p_offset and d_secperunit with
DL_[GET|SET]PSIZE(), DL_[GET|SET]POFFSET(), DL_[GET|SET]DSIZE() in order to get|set correct value that includes the high bits of the value.
Diffstat (limited to 'sys/arch/socppc')
-rw-r--r--sys/arch/socppc/stand/boot/wd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/socppc/stand/boot/wd.c b/sys/arch/socppc/stand/boot/wd.c
index d381508abc2..848ee1093c1 100644
--- a/sys/arch/socppc/stand/boot/wd.c
+++ b/sys/arch/socppc/stand/boot/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.6 2013/03/24 18:43:47 deraadt Exp $ */
+/* $OpenBSD: wd.c,v 1.7 2013/11/05 00:51:58 krw Exp $ */
/* $NetBSD: wd.c,v 1.5 2005/12/11 12:17:06 christos Exp $ */
/*-
@@ -143,13 +143,13 @@ wdgetdefaultlabel(wd, lp)
strncpy(lp->d_typename, wd->sc_params.atap_model, 16);
strncpy(lp->d_packname, "fictitious", 16);
if (wd->sc_capacity > UINT32_MAX)
- lp->d_secperunit = UINT32_MAX;
+ DL_SETDSIZE(lp, UINT32_MAX);
else
- lp->d_secperunit = wd->sc_capacity;
+ DL_SETDSIZE(lp, wd->sc_capacity);
lp->d_flags = 0;
- lp->d_partitions[RAW_PART].p_offset = 0;
- lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
+ DL_SETPOFFSET(&lp->d_partitions[RAW_PART], 0);
+ DL_SETPSIZE(&lp->d_partitions[RAW_PART], DL_GETDSIZE(lp));
lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED;
lp->d_npartitions = MAXPARTITIONS;