diff options
-rw-r--r-- | mdadm.c | 4 | ||||
-rw-r--r-- | util.c | 7 |
2 files changed, 8 insertions, 3 deletions
@@ -199,7 +199,8 @@ int main(int argc, char *argv[]) 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; @@ -511,6 +512,7 @@ int main(int argc, char *argv[]) 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; @@ -884,11 +884,14 @@ int find_free_devnum(int use_partitions) for (devnum = 127; devnum != 128; devnum = devnum ? devnum-1 : (1<<22)-1) { char *dn; - if (mddev_busy(use_partitions ? (-1-devnum) : devnum)) + int _devnum; + + _devnum = use_partitions ? (-1-devnum) : devnum; + if (mddev_busy(_devnum)) continue; /* make sure it is new to /dev too, at least as a * non-standard */ - dn = map_dev(dev2major(devnum), dev2minor(devnum), 0); + dn = map_dev(dev2major(_devnum), dev2minor(_devnum), 0); if (dn && ! is_standard(dn, NULL)) continue; break; |