Prints the address of blocks with silent errors.

This commit is contained in:
Andrea Mazzoleni 2013-06-29 17:54:35 +02:00
parent a32a1cd9a8
commit 9d1fbd8bfc

View file

@ -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);