aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2021-05-26 16:33:04 -0700
committerVishal Verma <vishal.l.verma@intel.com>2021-05-26 17:50:16 -0600
commitc52109355b715bbe21e284090435bee7563863cc (patch)
tree8da09f2a489268cd34621ec43d9990a41ee75b79
parente086106b4d81a2079141c848db7695451c04e877 (diff)
ndctl/scrub: Stop translating return values
In preparation for triggering a poll loop within ndctl_bus_start_scrub(), stop translating return values into -EOPNOTSUPP. Link: https://lore.kernel.org/r/162207198482.3715490.5994844104395495686.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
-rw-r--r--ndctl/lib/libndctl.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
index aa36a3c8..e5641fee 100644
--- a/ndctl/lib/libndctl.c
+++ b/ndctl/lib/libndctl.c
@@ -1354,14 +1354,8 @@ static int __ndctl_bus_get_scrub_state(struct ndctl_bus *bus,
NDCTL_EXPORT int ndctl_bus_start_scrub(struct ndctl_bus *bus)
{
struct ndctl_ctx *ctx = ndctl_bus_get_ctx(bus);
- int rc;
- rc = sysfs_write_attr(ctx, bus->scrub_path, "1\n");
- if (rc == -EBUSY)
- return rc;
- else if (rc < 0)
- return -EOPNOTSUPP;
- return 0;
+ return sysfs_write_attr(ctx, bus->scrub_path, "1\n");
}
NDCTL_EXPORT int ndctl_bus_get_scrub_state(struct ndctl_bus *bus)