diff options
author | NeilBrown <neilb@suse.de> | 2012-06-04 12:31:40 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-06-04 12:31:40 +1000 |
commit | 9dad51d41853a1bf791dfe418b67fefac21c4670 (patch) | |
tree | 02418b4e58745742430fa3f0c2fec9ce2e712a61 /Detail.c | |
parent | b0599bda13ede5b6022ad0c6fdd6641f07a008ed (diff) |
Monitor: fix inconsistencies in values for ->percent
->percent sometimes stores negative values recording states
like 'pending' or 'delayed'.
The value '-2' means both 'delayed' and in Monitor, 'unknown'.
Also, '-1' has a meaning but not #define.
So change the #defines to be prefixed with "RESYNC_", instead
of "PROCESS_", add new "_NONE" and "_UNKNOWN", and use correct
value in each location.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -374,11 +374,11 @@ int Detail(char *dev, int brief, int export, int test, char *homehost, char *pre printf(" State : %s%s%s%s%s%s \n", (array.state&(1<<MD_SB_CLEAN))?"clean":"active", st, - (!e || (e->percent < 0 && e->percent != PROCESS_PENDING && - e->percent != PROCESS_DELAYED)) ? "" : sync_action[e->resync], + (!e || (e->percent < 0 && e->percent != RESYNC_PENDING && + e->percent != RESYNC_DELAYED)) ? "" : sync_action[e->resync], larray_size ? "": ", Not Started", - e->percent == PROCESS_DELAYED ? " (DELAYED)": "", - e->percent == PROCESS_PENDING ? " (PENDING)": ""); + e->percent == RESYNC_DELAYED ? " (DELAYED)": "", + e->percent == RESYNC_PENDING ? " (PENDING)": ""); } if (array.raid_disks) printf(" Active Devices : %d\n", array.active_disks); |