Doesn't create the pool directory if missing.

This commit is contained in:
Andrea Mazzoleni 2013-03-10 19:54:37 +01:00
parent dffb1c655f
commit 0ab9066a4f
5 changed files with 4 additions and 7 deletions

View file

@ -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

7
pool.c
View file

@ -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);

View file

@ -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

View file

@ -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:

View file

@ -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
------------