From 9d1fbd8bfcc14fa85fb2ca67081ccf76ea0eca58 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sat, 29 Jun 2013 17:54:35 +0200 Subject: [PATCH] Prints the address of blocks with silent errors. --- status.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/status.c b/status.c index 419b8833..723cbb06 100644 --- a/status.c +++ b/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;iinfoarr, 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);