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;
writemostly = 1;
continue;
+ case O(MANAGE,'w'):
+ /* clear write-mostly for following devices */
+ writemostly = 2;
+ continue;
+
+
case O(GROW,'z'):
case O(CREATE,'z'): /* size */
if (size >= 0) {
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;
runstop = -1;
continue;
- case O(MANAGE,'o'):
- if (readonly < 0) {
- fprintf(stderr, Name ": Cannot have both readonly and readwrite\n");
- exit(2);
- }
- readonly = 1;
- continue;
- case O(MANAGE,'w'):
- if (readonly > 0) {
- fprintf(stderr, Name ": Cannot have both readwrite and readonly.\n");
- exit(2);
- }
- readonly = -1;
- continue;
-
case O(MISC,'Q'):
case O(MISC,'D'):
case O(MISC,'E'):
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;
break;
}
if (raiddisks == 0) {
- fprintf(stderr, Name ": no raid-disks specified.\n");
+ fprintf(stderr, Name ": no raid-devices specified.\n");
rv = 1;
break;
}
break;
}
if (raiddisks == 0) {
- fprintf(stderr, Name ": no raid-disks specified.\n");
+ fprintf(stderr, Name ": no raid-devices specified.\n");
rv = 1;
break;
}
}
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) {