mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-26 01:46:32 -05:00
Suppress missing file warnings if -m is specified
This commit is contained in:
parent
a5a72f4a31
commit
adbc74f862
10 changed files with 57 additions and 16 deletions
|
|
@ -999,7 +999,8 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna
|
|||
}
|
||||
} else {
|
||||
/* otherwise, open the file only for reading */
|
||||
ret = handle_open(&handle[j], file, state->file_mode, msg_warning);
|
||||
ret = handle_open(&handle[j], file, state->file_mode,
|
||||
msg_warning, state->opt.expected_missing ? msg_expected : 0);
|
||||
if (ret == -1) {
|
||||
/* save the failed block for the check/fix */
|
||||
failed[failed_count].is_bad = 1;
|
||||
|
|
@ -1063,7 +1064,8 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna
|
|||
}
|
||||
|
||||
/* read from the file */
|
||||
read_size = handle_read(&handle[j], block, buffer[j], state->block_size, msg_warning);
|
||||
read_size = handle_read(&handle[j], block, buffer[j], state->block_size,
|
||||
msg_warning, state->opt.expected_missing ? msg_expected : 0);
|
||||
if (read_size == -1) {
|
||||
/* save the failed block for the check/fix */
|
||||
failed[failed_count].is_bad = 1; /* it's bad because we cannot read it */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue