mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Removes too verbose printing in check/fix.
This commit is contained in:
parent
185d3a4a18
commit
15d9bb4db2
4 changed files with 36 additions and 9 deletions
32
check.c
32
check.c
|
|
@ -1002,7 +1002,9 @@ static int state_check_process(struct snapraid_state* state, int check, int fix,
|
|||
}
|
||||
|
||||
fprintf(stdlog, "status:unrecoverable:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
printf("unrecoverable %s\n", path);
|
||||
if (state->opt.verbose) {
|
||||
printf("unrecoverable %s\n", path);
|
||||
}
|
||||
|
||||
/* and do not set the time if damaged */
|
||||
continue;
|
||||
|
|
@ -1015,7 +1017,9 @@ static int state_check_process(struct snapraid_state* state, int check, int fix,
|
|||
}
|
||||
|
||||
fprintf(stdlog, "status:recovered:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
printf("recovered %s\n", path);
|
||||
if (state->opt.verbose) {
|
||||
printf("recovered %s\n", path);
|
||||
}
|
||||
|
||||
inode = handle[j].st.st_ino;
|
||||
|
||||
|
|
@ -1055,14 +1059,20 @@ static int state_check_process(struct snapraid_state* state, int check, int fix,
|
|||
if (file_flag_has(file, FILE_IS_DAMAGED)) {
|
||||
if (!check) {
|
||||
fprintf(stdlog, "status:damaged:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
printf("damaged %s\n", path);
|
||||
if (state->opt.verbose) {
|
||||
printf("damaged %s\n", path);
|
||||
}
|
||||
} else {
|
||||
fprintf(stdlog, "status:unrecoverable:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
printf("unrecoverable %s\n", path);
|
||||
if (state->opt.verbose) {
|
||||
printf("unrecoverable %s\n", path);
|
||||
}
|
||||
}
|
||||
} else if (file_flag_has(file, FILE_IS_FIXED)) {
|
||||
fprintf(stdlog, "status:recoverable:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
printf("recoverable %s\n", path);
|
||||
if (state->opt.verbose) {
|
||||
printf("recoverable %s\n", path);
|
||||
}
|
||||
} else {
|
||||
fprintf(stdlog, "status:correct:%s:%s\n", handle[j].disk->name, file->sub);
|
||||
if (state->opt.verbose) {
|
||||
|
|
@ -1195,7 +1205,9 @@ close_and_continue:
|
|||
++recovered_error;
|
||||
|
||||
fprintf(stdlog, "status:recovered:%s:%s\n", disk->name, file->sub);
|
||||
printf("recovered %s%s\n", disk->dir, file->sub);
|
||||
if (state->opt.verbose) {
|
||||
printf("recovered %s%s\n", disk->dir, file->sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1358,7 +1370,9 @@ close_and_continue:
|
|||
}
|
||||
|
||||
fprintf(stdlog, "status:recovered:%s:%s\n", disk->name, link->sub);
|
||||
printf("recovered %s%s\n", disk->dir, link->sub);
|
||||
if (state->opt.verbose) {
|
||||
printf("recovered %s%s\n", disk->dir, link->sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1424,7 +1438,9 @@ close_and_continue:
|
|||
++recovered_error;
|
||||
|
||||
fprintf(stdlog, "status:recovered:%s:%s\n", disk->name, dir->sub);
|
||||
printf("recovered %s%s\n", disk->dir, dir->sub);
|
||||
if (state->opt.verbose) {
|
||||
printf("recovered %s%s\n", disk->dir, dir->sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue