summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2007-06-05 00:38:12 +0000
committerderaadt <deraadt@openbsd.org>2007-06-05 00:38:12 +0000
commite16633b4e5ee7873f0d213b0c3f0e7d56c000d85 (patch)
treeb13c42bb504d789800ed58b3769fc333ecd1e41b /sys/dev/softraid.c
parentzap extra param (diff)
downloadwireguard-openbsd-e16633b4e5ee7873f0d213b0c3f0e7d56c000d85.tar.xz
wireguard-openbsd-e16633b4e5ee7873f0d213b0c3f0e7d56c000d85.zip
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/dev/softraid.c')
-rw-r--r--sys/dev/softraid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index 5e81ac92fca..25ae3a7c5a1 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.77 2007/06/04 04:53:31 marco Exp $ */
+/* $OpenBSD: softraid.c,v 1.78 2007/06/05 00:38:20 deraadt Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
*
@@ -1073,7 +1073,7 @@ sr_open_chunks(struct sr_softc *sc, struct sr_chunk_head *cl, dev_t *dt,
}
/* get partition size */
- ch_entry->src_size = size = label.d_partitions[part].p_size -
+ ch_entry->src_size = size = DL_GETPSIZE(&label.d_partitions[part]) -
SR_META_SIZE - SR_META_OFFSET;
if (size <= 0) {
printf("%s: %s partition too small\n",