mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Prints the address of blocks with silent errors.
This commit is contained in:
parent
a32a1cd9a8
commit
9d1fbd8bfc
1 changed files with 19 additions and 2 deletions
21
status.c
21
status.c
|
|
@ -211,10 +211,27 @@ int state_status(struct snapraid_state* state)
|
|||
|
||||
printf("\n");
|
||||
|
||||
if (error)
|
||||
if (error) {
|
||||
printf("DANGER! In the array there are %u failing blocks!\n", error);
|
||||
else
|
||||
|
||||
printf("They are:");
|
||||
|
||||
/* print all the errors */
|
||||
for(i=0;i<blockmax;++i) {
|
||||
snapraid_info info = info_get(&state->infoarr, i);
|
||||
|
||||
/* skip unused blocks */
|
||||
if (info == 0)
|
||||
continue;
|
||||
|
||||
if (info_get_error(info))
|
||||
printf(" %u", i);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
} else {
|
||||
printf("No silent error detected!\n");
|
||||
}
|
||||
|
||||
/* free the temp vector */
|
||||
free(infomap);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue