summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-07-24 21:42:50 +0000
committerMiles Bader <miles@gnu.org>1997-07-24 21:42:50 +0000
commit58424393298983451c3fd37f5adcc7dc1d9ef9fe (patch)
treea4908b64e42e0c71772b04a25e66b34edabcc518
parent6195c08a6ac9cc80569c8a688136e674863c66b9 (diff)
(_store_create):
If BLOCK_SIZE is zero, make sure there are no runs.
-rw-r--r--libstore/make.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstore/make.c b/libstore/make.c
index d64e305e..f899398c 100644
--- a/libstore/make.c
+++ b/libstore/make.c
@@ -30,7 +30,7 @@ _store_create (const struct store_class *class,
const struct store_run *runs, size_t num_runs, off_t end,
struct store **store)
{
- if (block_size & (block_size - 1))
+ if ((block_size & (block_size - 1)) || (block_size == 0 && num_runs > 0))
return EINVAL; /* block size not a power of two. */
else
{