fix: incremental for bare disks returns invalid value
return value should remain the same as result of Manage_Subdevs (last significant operation). Right now it is inverted what results in error status for successful operation. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
ed690d36e2
commit
8659d08998
|
@ -834,7 +834,7 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
|
|||
* If st is set, then only arrays of that type are considered
|
||||
* Return 0 on success, or some exit code on failure, probably 1.
|
||||
*/
|
||||
int rv = -1;
|
||||
int rv = 1;
|
||||
struct stat stb;
|
||||
struct map_ent *mp, *map = NULL;
|
||||
struct mdinfo *chosen = NULL;
|
||||
|
@ -1002,7 +1002,7 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
|
|||
}
|
||||
sysfs_free(chosen);
|
||||
}
|
||||
return rv ? 0 : 1;
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int partition_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
|
||||
|
|
Loading…
Reference in New Issue