case 'G': newmode = GROW;
shortopt = short_bitmap_options;
break;
- case 'I': newmode = INCREMENTAL; break;
+ case 'I': newmode = INCREMENTAL;
+ shortopt = short_bitmap_auto_options; break;
case AutoDetect:
newmode = AUTODETECT; break;
case O(CREATE,'a'):
case O(BUILD,'a'):
+ case O(INCREMENTAL,'a'):
case O(ASSEMBLE,'a'): /* auto-creation of device node */
autof = parse_auto(optarg, "--auto flag", 0);
continue;
test = 1;
continue;
case O(MONITOR,'y'): /* log messages to syslog */
- openlog("mdadm", 0, SYSLOG_FACILITY);
+ openlog("mdadm", LOG_PID, SYSLOG_FACILITY);
dosyslog = 1;
continue;
int acnt;
ident.autof = autof;
do {
+ mddev_dev_t devlist = conf_get_devs();
acnt = 0;
do {
rv2 = Assemble(ss, NULL, -1,
&ident,
- NULL, NULL,
+ devlist, NULL,
readonly, runstop, NULL, homehost, verbose-quiet, force);
if (rv2==0) {
cnt++;
if (cnt == 0 && rv == 0) {
fprintf(stderr, Name ": No arrays found in config file or automatically\n");
rv = 1;
- }
+ } else if (cnt)
+ rv = 0;
} else if (cnt == 0 && rv == 0) {
fprintf(stderr, Name ": No arrays found in config file\n");
rv = 1;
}
if (brief && verbose)
brief = 2;
- rv = Examine(devlist, scan?(verbose>1?0:verbose+1):brief, scan, SparcAdjust, ss, homehost);
+ rv = Examine(devlist, scan?(verbose>1?0:verbose+1):brief,
+ export, scan,
+ SparcAdjust, ss, homehost);
} else {
if (devlist == NULL) {
if (devmode=='D' && scan) {
put_md_name(name);
}
+ /* This is a bit of a hack.
+ * When we stop an array in a container, it
+ * takes a moment for mdmon to let go.
+ * So just pause briefly incase that is
+ * happening. Maybe we should do something
+ * more deterministic via the socket.
+ */
+ if (progress && err)
+ usleep(50000);
+
} while (!last && err);
if (err) rv |= 1;
} else {
export, test, homehost);
continue;
case 'K': /* Zero superblock */
- rv |= Kill(dv->devname, force, quiet); continue;
+ rv |= Kill(dv->devname, force, quiet,0);
+ continue;
case 'Q':
rv |= Query(dv->devname); continue;
case 'X':