In preparation for adding 'start-scrub' and 'wait-scrub' utilities,
define new device actions for these operations.
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
ndctl/action.h | 2 ++
ndctl/namespace.c | 3 +++
2 files changed, 5 insertions(+)
diff --git a/ndctl/action.h b/ndctl/action.h
index 43ea62adbcd2..1ecad49530d5 100644
--- a/ndctl/action.h
+++ b/ndctl/action.h
@@ -11,5 +11,7 @@ enum device_action {
ACTION_CREATE,
ACTION_DESTROY,
ACTION_CHECK,
+ ACTION_WAIT,
+ ACTION_START,
};
#endif /* __NDCTL_ACTION_H__ */
diff --git a/ndctl/namespace.c b/ndctl/namespace.c
index aef356abbee1..1c39d9b01adc 100644
--- a/ndctl/namespace.c
+++ b/ndctl/namespace.c
@@ -1054,6 +1054,9 @@ static int do_xaction_namespace(const char *namespace,
if (rc < 0)
return rc;
return 1;
+ default:
+ rc = -EINVAL;
+ break;
}
if (rc >= 0)
success++;