From 0ab9066a4f2cb6ecb40d107e8cbe0993f916dc49 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 10 Mar 2013 19:54:37 +0100 Subject: [PATCH] Doesn't create the pool directory if missing. --- Makefile.am | 1 + pool.c | 7 ------- snapraid.1 | 1 + snapraid.d | 1 + snapraid.txt | 1 + 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2249ab7f..e66eb0be 100644 --- a/Makefile.am +++ b/Makefile.am @@ -91,6 +91,7 @@ check-local: mkdir test/disk1 mkdir test/disk2 mkdir test/disk3 + mkdir test/pool echo --- Help $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -h echo --- As empty, sync and check diff --git a/pool.c b/pool.c index 3d942d2b..925c1634 100644 --- a/pool.c +++ b/pool.c @@ -163,7 +163,6 @@ void state_pool(struct snapraid_state* state) { tommy_node* i; char pool_dir[PATH_MAX]; - int ret; unsigned count; if (state->pool[0] == 0) { @@ -177,12 +176,6 @@ void state_pool(struct snapraid_state* state) pathprint(pool_dir, sizeof(pool_dir), "%s", state->pool); pathslash(pool_dir, sizeof(pool_dir)); - /* create it if missing */ - ret = mkancestor(pool_dir); - if (ret != 0) { - exit(EXIT_FAILURE); - } - /* first clear the previous pool tree */ clean_dir(state, pool_dir); diff --git a/snapraid.1 b/snapraid.1 index da51d863..87f938e0 100644 --- a/snapraid.1 +++ b/snapraid.1 @@ -657,6 +657,7 @@ is 1073741824 bytes. .SS pool DIR Defines the pooling directory where the virtual view of the disk array is created using the \(a"pool\(a" command. +The directory must already exist. .SS Examples An example of a typical configuration for Unix is: .PP diff --git a/snapraid.d b/snapraid.d index 44f89835..bc1883a6 100644 --- a/snapraid.d +++ b/snapraid.d @@ -521,6 +521,7 @@ Configuration pool DIR Defines the pooling directory where the virtual view of the disk array is created using the "pool" command. + The directory must already exist. Examples An example of a typical configuration for Unix is: diff --git a/snapraid.txt b/snapraid.txt index b6946f90..78c590cd 100644 --- a/snapraid.txt +++ b/snapraid.txt @@ -573,6 +573,7 @@ is 1073741824 bytes. ---- 7.7.2 pool DIR ---- Defines the pooling directory where the virtual view of the disk array is created using the "pool" command. +The directory must already exist. 7.8 Examples ------------