Groups all the startup options in the new snapraid_option struct.

This commit is contained in:
Andrea Mazzoleni 2013-06-29 18:11:36 +02:00
parent 9d1fbd8bfc
commit 1ddb24da46
13 changed files with 152 additions and 192 deletions

View file

@ -62,7 +62,7 @@ static void import_file(struct snapraid_state* state, const char* path, uint64_t
/* open for read */
/* O_SEQUENTIAL: opening in sequential mode in Windows */
flags = O_RDONLY | O_BINARY;
if (!state->skip_sequential)
if (!state->opt.skip_sequential)
flags |= O_SEQUENTIAL;
f = open(path, flags);
if (f == -1) {
@ -71,7 +71,7 @@ static void import_file(struct snapraid_state* state, const char* path, uint64_t
}
#if HAVE_POSIX_FADVISE
if (!state->skip_sequential) {
if (!state->opt.skip_sequential) {
/* advise sequential access */
ret = posix_fadvise(f, 0, 0, POSIX_FADV_SEQUENTIAL);
if (ret != 0) {