From 58424393298983451c3fd37f5adcc7dc1d9ef9fe Mon Sep 17 00:00:00 2001
From: Miles Bader <miles@gnu.org>
Date: Thu, 24 Jul 1997 21:42:50 +0000
Subject: (_store_create):   If BLOCK_SIZE is zero, make sure there are no
 runs.

---
 libstore/make.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'libstore')

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
     {
-- 
cgit v1.2.3