diff options
author | NeilBrown <neilb@suse.de> | 2012-07-09 09:19:48 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-07-09 09:19:48 +0200 |
commit | 265460ababa169a2a0926b5fba10724ba117e318 (patch) | |
tree | 06718d59a40d6f6e318e53150f841894bd4e343c /Examine.c | |
parent | Change Create to take a struct context (diff) | |
download | mdadm-265460ababa169a2a0926b5fba10724ba117e318.tar.xz mdadm-265460ababa169a2a0926b5fba10724ba117e318.zip |
Examine: split 'verbose' out from 'brief'.
The value of 'verbose' is sometimes mixed into 'brief', particularly
for Examine.
This is messy and confusing. So keep them separate.
'brief' still gets assumed when 'scan' is set, unless we are very
verbose.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Examine.c')
-rw-r--r-- | Examine.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -30,7 +30,8 @@ #endif #include "md_u.h" #include "md_p.h" -int Examine(struct mddev_dev *devlist, int brief, int export, int scan, +int Examine(struct mddev_dev *devlist, int brief, int verbose, + int export, int scan, int SparcAdjust, struct supertype *forcest, char *homehost) { @@ -161,10 +162,10 @@ int Examine(struct mddev_dev *devlist, int brief, int export, int scan, char *d; int newline = 0; - ap->st->ss->brief_examine_super(ap->st, brief > 1); + ap->st->ss->brief_examine_super(ap->st, verbose > 0); if (ap->spares) newline += printf(" spares=%d", ap->spares); - if (brief > 1) { + if (verbose > 0) { newline += printf(" devices"); for (d=dl_next(ap->devs); d!= ap->devs; d=dl_next(d)) { printf("%c%s", sep, d); @@ -174,11 +175,11 @@ int Examine(struct mddev_dev *devlist, int brief, int export, int scan, if (ap->st->ss->brief_examine_subarrays) { if (newline) printf("\n"); - ap->st->ss->brief_examine_subarrays(ap->st, brief > 1); + ap->st->ss->brief_examine_subarrays(ap->st, verbose); } ap->st->ss->free_super(ap->st); /* FIXME free ap */ - if (ap->spares || brief > 1) + if (ap->spares || verbose > 0) printf("\n"); } } |