From 2ff032823f6acf0cc409c0e541041ebe1f0dbc75 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Thu, 10 Nov 2016 21:44:22 -0500 Subject: Clean out huge swacks of RPC API we don't need anymore. pkey attribute API is now just set_attributes() and get_attributes(). --- ks_index.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ks_index.c') diff --git a/ks_index.c b/ks_index.c index fe4d1b8..0c12fcc 100644 --- a/ks_index.c +++ b/ks_index.c @@ -230,7 +230,8 @@ hal_error_t hal_ks_index_find_range(hal_ks_index_t *ksi, const unsigned max_blocks, unsigned *n_blocks, unsigned *blocknos, - int *hint) + int *hint, + const int strict) { if (ksi == NULL || ksi->index == NULL || ksi->names == NULL || ksi->size == 0 || ksi->used > ksi->size || name == NULL) @@ -246,7 +247,7 @@ hal_error_t hal_ks_index_find_range(hal_ks_index_t *ksi, int n = 0; for (int i = where; i < ksi->used && !hal_uuid_cmp(name, &ksi->names[ksi->index[i]].name); i++) { - if (n != ksi->names[ksi->index[i]].chunk) + if (strict && n != ksi->names[ksi->index[i]].chunk) return HAL_ERROR_IMPOSSIBLE; if (blocknos != NULL && n < max_blocks) blocknos[n] = ksi->index[i]; -- cgit v1.2.3