Adds filter exclusion.

Some refactoring.
This commit is contained in:
Andrea Mazzoleni 2011-03-16 23:52:10 +01:00
parent c2d113685e
commit b9b8fd0bb8
24 changed files with 687 additions and 217 deletions

View file

@ -18,6 +18,7 @@
#include "portable.h"
#include "elem.h"
#include "util.h"
#include "handle.h"
/****************************************************************************/
@ -42,7 +43,7 @@ int handle_create(struct snapraid_handle* handle, struct snapraid_file* file)
}
}
snprintf(handle->path, sizeof(handle->path), "%s%s", handle->disk->dir, file->sub);
pathprint(handle->path, sizeof(handle->path), "%s%s", handle->disk->dir, file->sub);
handle->f = open(handle->path, O_RDWR | O_CREAT | O_BINARY, 0600);
if (handle->f == -1) {
@ -115,7 +116,7 @@ int handle_open(int ret_on_error, struct snapraid_handle* handle, struct snaprai
}
}
snprintf(handle->path, sizeof(handle->path), "%s%s", handle->disk->dir, file->sub);
pathprint(handle->path, sizeof(handle->path), "%s%s", handle->disk->dir, file->sub);
handle->f = open(handle->path, O_RDONLY | O_BINARY);
if (handle->f == -1) {