#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)
{
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);
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");
}
}
ident.autof = c.autof;
+ if (c.scan && c.verbose < 2)
+ /* --scan implied --brief unless -vv */
+ c.brief = 1;
+
rv = 0;
switch(mode) {
case MANAGE:
pr_err("No devices listed in %s\n", configfile?configfile:DefaultConfFile);
exit(1);
}
- if (c.brief && c.verbose > 0)
- c.brief = 2;
- rv = Examine(devlist, c.scan?(c.verbose>1?0:c.verbose):c.brief,
+ rv = Examine(devlist, c.brief, c.verbose,
c.export, c.scan,
c.SparcAdjust, ss, c.homehost);
} else if (devmode == DetailPlatform) {
extern int Detail(char *dev, int brief, int export, int test, char *homehost, char *prefer);
extern int Detail_Platform(struct superswitch *ss, int scan, int verbose);
extern int Query(char *dev);
-extern int Examine(struct mddev_dev *devlist, int brief, int export, int scan,
+extern int Examine(struct mddev_dev *devlist, int brief, int verbose, int export, int scan,
int SparcAdjust, struct supertype *forcest, char *homehost);
extern int Monitor(struct mddev_dev *devlist,
char *mailaddr, char *alert_cmd,