aboutsummaryrefslogtreecommitdiff
path: root/ks_index.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-11-10 21:44:22 -0500
committerRob Austein <sra@hactrn.net>2016-11-10 21:44:22 -0500
commit2ff032823f6acf0cc409c0e541041ebe1f0dbc75 (patch)
tree547c9c218a147f500c341e74afa8df2ba8642c1e /ks_index.c
parent1f78f1bad3ab08706df3030936275b6114f31e24 (diff)
Clean out huge swacks of RPC API we don't need anymore.
pkey attribute API is now just set_attributes() and get_attributes().
Diffstat (limited to 'ks_index.c')
-rw-r--r--ks_index.c5
1 files changed, 3 insertions, 2 deletions
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];