mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-02 12:57:14 -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
6
dry.c
6
dry.c
|
|
@ -77,7 +77,7 @@ static int state_dry_process(struct snapraid_state* state, struct snapraid_parit
|
|||
}
|
||||
|
||||
/* open the file only for reading */
|
||||
ret = handle_open(&handle[j], block_file_get(block), stdlog, state->skip_sequential);
|
||||
ret = handle_open(&handle[j], block_file_get(block), stdlog, state->opt.skip_sequential);
|
||||
if (ret == -1) {
|
||||
fprintf(stderr, "DANGER! Unexpected open error in a data disk, it isn't possible to rehash.\n");
|
||||
printf("Stopping at block %u\n", i);
|
||||
|
|
@ -180,7 +180,7 @@ void state_dry(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
/* open the file for reading */
|
||||
/* it may fail if the file doesn't exist, in this case we continue to dry the files */
|
||||
parity_ptr = &parity;
|
||||
ret = parity_open(parity_ptr, state->parity, state->skip_sequential);
|
||||
ret = parity_open(parity_ptr, state->parity, state->opt.skip_sequential);
|
||||
if (ret == -1) {
|
||||
printf("No accessible Parity file.\n");
|
||||
/* continue anyway */
|
||||
|
|
@ -189,7 +189,7 @@ void state_dry(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
|
||||
if (state->level >= 2) {
|
||||
qarity_ptr = &qarity;
|
||||
ret = parity_open(qarity_ptr, state->qarity, state->skip_sequential);
|
||||
ret = parity_open(qarity_ptr, state->qarity, state->opt.skip_sequential);
|
||||
if (ret == -1) {
|
||||
printf("No accessible Q-Parity file.\n");
|
||||
/* continue anyway */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue