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
Cc: Dan Williams
Signed-off-by: Vishal Verma
---
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 -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-le...@lists.01.org