diff options
-rw-r--r-- | libstore/ChangeLog | 11 | ||||
-rw-r--r-- | libstore/decode.c | 2 | ||||
-rw-r--r-- | libstore/kids.c | 4 | ||||
-rw-r--r-- | libstore/stripe.c | 5 |
4 files changed, 18 insertions, 4 deletions
diff --git a/libstore/ChangeLog b/libstore/ChangeLog index efb55373..4e3c400f 100644 --- a/libstore/ChangeLog +++ b/libstore/ChangeLog @@ -1,3 +1,14 @@ +2002-03-11 Marcus Brinkmann <marcus@gnu.org> + + * stripe.c (store_concat_class): Add store_concat_open. + (store_concat_create): Do not multiply NUM_STORES with 2 to get + the number of runs. + * kids.c (store_allocate_child_encodings): Call allocate_encoding + on child store K, not on STORE. + (store_encode_children): Likewise. + * decode.c (store_std_leaf_decode): Increment ENC->cur_data by + NAME_LEN and MISC_LEN as appropriate. + 2002-03-05 Roland McGrath <roland@frob.com> * device.c (dev_map): Pass proper OFFSET and SIZE params to device_map. diff --git a/libstore/decode.c b/libstore/decode.c index cc063d34..cae2ba2f 100644 --- a/libstore/decode.c +++ b/libstore/decode.c @@ -69,6 +69,7 @@ store_std_leaf_decode (struct store_enc *enc, name = strdup (enc->data + enc->cur_data); if (! name) return ENOMEM; + enc->cur_data += name_len; } else name = 0; @@ -83,6 +84,7 @@ store_std_leaf_decode (struct store_enc *enc, return ENOMEM; } memcpy (misc, enc->data + enc->cur_data + name_len, misc_len); + enc->cur_data += misc_len; } else misc = 0; diff --git a/libstore/kids.c b/libstore/kids.c index 1b9fa367..ceb80133 100644 --- a/libstore/kids.c +++ b/libstore/kids.c @@ -59,7 +59,7 @@ store_allocate_child_encodings (const struct store *store, { struct store *k = store->children[i]; if (k->class->allocate_encoding) - (*k->class->allocate_encoding) (store, enc); + (*k->class->allocate_encoding) (k, enc); else err = EOPNOTSUPP; } @@ -77,7 +77,7 @@ store_encode_children (const struct store *store, struct store_enc *enc) { struct store *k = store->children[i]; if (k->class->encode) - (*k->class->encode) (store, enc); + (*k->class->encode) (k, enc); else err = EOPNOTSUPP; } diff --git a/libstore/stripe.c b/libstore/stripe.c index 90af39d5..24faeb80 100644 --- a/libstore/stripe.c +++ b/libstore/stripe.c @@ -150,7 +150,8 @@ store_concat_class = { STORAGE_CONCAT, "concat", stripe_read, stripe_write, concat_allocate_encoding, concat_encode, concat_decode, - store_set_child_flags, store_clear_child_flags, 0, 0, stripe_remap + store_set_child_flags, store_clear_child_flags, 0, 0, stripe_remap, + store_concat_open }; /* Return a new store in STORE that interleaves all the stores in STRIPES @@ -241,7 +242,7 @@ store_concat_create (struct store * const *stores, size_t num_stores, err = _store_create (&store_concat_class, MACH_PORT_NULL, flags | common_flags, block_size, - runs, num_stores * 2, 0, store); + runs, num_stores, 0, store); if (! err) { err = store_set_children (*store, stores, num_stores); |