summaryrefslogtreecommitdiffstats
path: root/sys/cam/ctl/ctl_backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cam/ctl/ctl_backend.c')
-rw-r--r--sys/cam/ctl/ctl_backend.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl_backend.c b/sys/cam/ctl/ctl_backend.c
index 91576c4..86f7d3c 100644
--- a/sys/cam/ctl/ctl_backend.c
+++ b/sys/cam/ctl/ctl_backend.c
@@ -243,3 +243,14 @@ ctl_get_opt(ctl_options_t *opts, const char *name)
}
return (NULL);
}
+
+int
+ctl_get_opt_number(ctl_options_t *opts, const char *name, uint64_t *val)
+{
+ const char *value;
+
+ value = ctl_get_opt(opts, name);
+ if (value == NULL)
+ return (-2);
+ return (ctl_expand_number(value, val));
+}
OpenPOWER on IntegriCloud