diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2008-01-24 13:54:48 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2008-01-24 13:54:48 +0000 |
commit | 9f28d47ae038d847f62edb4b1e1dd85a6c160951 (patch) | |
tree | 3090314714c66da350e292b6a7ed40efdbe2c90d /sys | |
parent | 2bf42661c229ba8669629455704cf2dfa25f312d (diff) |
KNF
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/softraid.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 191e2e3ce63..689e1e7a7c5 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.93 2008/01/20 17:20:10 marco Exp $ */ +/* $OpenBSD: softraid.c,v 1.94 2008/01/24 13:54:47 marco Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -823,7 +823,7 @@ sr_ioctl_createraid(struct sr_softc *sc, struct bioc_createraid *bc, int user) sd->sd_vol.sv_meta.svm_size = vol_size; sd->sd_vol.sv_meta.svm_status = BIOC_SVONLINE; sd->sd_vol.sv_meta.svm_level = bc->bc_level; - sd->sd_vol.sv_meta.svm_strip_size = strip_size; + sd->sd_vol.sv_meta.svm_strip_size = strip_size; strlcpy(sd->sd_vol.sv_meta.svm_vendor, "OPENBSD", sizeof(sd->sd_vol.sv_meta.svm_vendor)); snprintf(sd->sd_vol.sv_meta.svm_product, @@ -1065,8 +1065,9 @@ sr_open_chunks(struct sr_softc *sc, struct sr_chunk_head *cl, dev_t *dt, goto unwind; } - /* get partition size */ - ch_entry->src_size = size = DL_GETPSIZE(&label.d_partitions[part]) - + /* get partition size while accounting for metadata! */ + 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", |