mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 03:16:59 -05:00
Groups all the startup options in the new snapraid_option struct.
This commit is contained in:
parent
9d1fbd8bfc
commit
1ddb24da46
13 changed files with 152 additions and 192 deletions
4
import.c
4
import.c
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue