switch(opt) {
case '@': /* just incase they say --manage */
newmode = MANAGE;
- shortopt = short_bitmap_auto_options;
+ shortopt = short_bitmap_options;
break;
case 'a':
case 'r':
case ReAdd: /* re-add */
if (!mode) {
newmode = MANAGE;
- shortopt = short_bitmap_auto_options;
+ shortopt = short_bitmap_options;
}
break;
case 'B': newmode = BUILD; shortopt = short_bitmap_auto_options; break;
case 'C': newmode = CREATE; shortopt = short_bitmap_auto_options; break;
case 'F': newmode = MONITOR;break;
- case 'G': newmode = GROW; shortopt = short_bitmap_auto_options; break;
+ case 'G': newmode = GROW;
+ shortopt = short_bitmap_options;
+ break;
case 'I': newmode = INCREMENTAL; break;
+ case AutoDetect:
+ newmode = AUTODETECT; break;
case '#':
case 'D':
case 'F':
case 'G':
case 'I':
+ case AutoDetect:
continue;
}
if (opt == 1) {
rv = 1;
break;
}
+ if (raiddisks == 0) {
+ fprintf(stderr, Name ": no raid-disks specified.\n");
+ rv = 1;
+ break;
+ }
if (bitmap_file) {
if (strcmp(bitmap_file, "internal")==0) {
rv = 1;
break;
}
+ if (raiddisks == 0) {
+ fprintf(stderr, Name ": no raid-disks specified.\n");
+ rv = 1;
+ break;
+ }
rv = Create(ss, devlist->devname, mdfd, chunk, level, layout, size<0 ? 0 : size,
raiddisks, sparedisks, ident.name, homehost,
}
rv = Incremental(devlist->devname, verbose-quiet, runstop,
ss, homehost, autof);
+ break;
+ case AUTODETECT:
+ autodetect();
+ break;
}
exit(rv);
}