X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=Incremental.c;h=abfea243c1f9143bc1eb6accf36035ae342669eb;hb=1dccfff910ce9d854330302b9a34636d63cdac7b;hp=96bfcec7fc586f38a1cec96c746cb188981b0bc7;hpb=1538aca5cbbd99be47657e0ca0b7e2186426a1b1;p=thirdparty%2Fmdadm.git diff --git a/Incremental.c b/Incremental.c index 96bfcec7..abfea243 100644 --- a/Incremental.c +++ b/Incremental.c @@ -376,7 +376,16 @@ int Incremental(char *devname, int verbose, int runstop, * statement about this. */ if (runstop < 1) { - if (ioctl(mdfd, GET_ARRAY_INFO, &ainf) == 0) { + int active = 0; + + if (st->ss->external) { + char *devname = devnum2devname(fd2devnum(mdfd)); + + active = devname && is_container_active(devname); + free(devname); + } else if (ioctl(mdfd, GET_ARRAY_INFO, &ainf) == 0) + active = 1; + if (active) { fprintf(stderr, Name ": not adding %s to active array (without --run) %s\n", devname, chosen_name);