The reconfig_mode_{devdax,system_ram}() function can have a positive
return status from memory online/offline operations, indicating skipped
memory blocks. Don't omit printing the device listing json in these
cases; the reconfiguration has succeeded, and its results should be
printed.Link: https://github.com/pmem/ndctl/issues/115 Reported-by: Michal Biesek <[email protected]> Cc: Dan Williams <[email protected]> Signed-off-by: Vishal Verma <[email protected]> --- daxctl/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daxctl/device.c b/daxctl/device.c index 4887ccf..920efc6 100644 --- a/daxctl/device.c +++ b/daxctl/device.c @@ -398,7 +398,7 @@ static int do_reconfig(struct daxctl_dev *dev, enum dev_mode mode, rc = -EINVAL; } - if (rc) + if (rc < 0) return rc; *jdevs = json_object_new_array(); -- 2.20.1 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
