ndctl_bus_wait_for_scrub_completion() printed the same debug message irrespective of whether we encountered a failure or not. Add a newe debug message that is printed for failing cases.
Cc: Dan Williams <[email protected]> Signed-off-by: Vishal Verma <[email protected]> --- ndctl/lib/libndctl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index 2a3ef0c..6733b85 100644 --- a/ndctl/lib/libndctl.c +++ b/ndctl/lib/libndctl.c @@ -1248,7 +1248,11 @@ NDCTL_EXPORT int ndctl_bus_wait_for_scrub_completion(struct ndctl_bus *bus) } } - dbg(ctx, "bus%d: scrub complete\n", ndctl_bus_get_id(bus)); + if (rc == 0) + dbg(ctx, "bus%d: scrub complete\n", ndctl_bus_get_id(bus)); + else + dbg(ctx, "bus%d: error waiting for scrub completion: %s\n", + ndctl_bus_get_id(bus), strerror(-rc)); if (fd) close (fd); return rc; -- 2.14.3 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
