diff options
author | Miles Bader <miles@gnu.org> | 1996-03-19 23:59:30 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-03-19 23:59:30 +0000 |
commit | 24f1bcac8891fcf7d7d26847cca95d9662cca158 (patch) | |
tree | d5898903de20a1450e08355fd340557f211fefc9 /libstore | |
parent | a55d1e481d46229515418b28981e92109cfdd5c1 (diff) |
entered into RCS
Diffstat (limited to 'libstore')
-rw-r--r-- | libstore/derive.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libstore/derive.c b/libstore/derive.c index f90138ba..b840e033 100644 --- a/libstore/derive.c +++ b/libstore/derive.c @@ -37,20 +37,20 @@ _store_derive (struct store *store) for (i = 0; i < runs_len; i += 2) { - store->wrap += runs[i + 1]; + store->wrap_src += runs[i + 1]; if (runs[i] >= 0) store->blocks += runs[i + 1]; } if (store->end == 0) /* END not set; set it using the info from RUNS. */ - store->end = store->wrap; - else if (store->wrap < store->end) + store->end = store->wrap_src; + else if (store->wrap_src < store->end) /* A wrapped disk! RUNS is repeated N times to reach END. Adjust BLOCKS to include all iterations. */ { - size_t num_iters = store->end / store->wrap; - off_t last_part_base = num_iters * store->wrap; + size_t num_iters = store->end / store->wrap_src; + off_t last_part_base = num_iters * store->wrap_src; store->blocks *= num_iters; @@ -62,6 +62,8 @@ _store_derive (struct store *store) } else if (runs[i] >= 0) store->blocks += runs[i + 1]; + + /* WRAP_DST must be set by the caller. */ } store->size = store->end * bsize; |