summaryrefslogtreecommitdiff
path: root/libbcache/opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcache/opts.c')
-rw-r--r--libbcache/opts.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/libbcache/opts.c b/libbcache/opts.c
index 60a2a4d..333654e 100644
--- a/libbcache/opts.c
+++ b/libbcache/opts.c
@@ -29,7 +29,6 @@ const char * const bch_str_hash_types[] = {
"crc32c",
"crc64",
"siphash",
- "sha1",
NULL
};
@@ -70,11 +69,11 @@ const char * const bch_uint_opt[] = {
};
enum bch_opts {
-#define CACHE_SET_OPT(_name, _choices, _min, _max, _sb_opt, _perm) \
+#define BCH_OPT(_name, _choices, _min, _max, _sb_opt, _perm) \
Opt_##_name,
- CACHE_SET_VISIBLE_OPTS()
-#undef CACHE_SET_OPT
+ BCH_VISIBLE_OPTS()
+#undef BCH_OPT
Opt_bad_opt,
};
@@ -144,15 +143,15 @@ static int parse_string_opt(const struct bch_option *opt, const char *s)
static struct bch_opt_result parse_one_opt(const char *opt)
{
static const struct bch_option opt_table[] = {
-#define CACHE_SET_OPT(_name, _choices, _min, _max, _sb_opt, _perm) \
+#define BCH_OPT(_name, _choices, _min, _max, _sb_opt, _perm) \
[Opt_##_name] = { \
.name = #_name, \
.opts = _choices, \
.min = _min, \
.max = _max, \
},
- CACHE_SET_VISIBLE_OPTS()
-#undef CACHE_SET_OPT
+ BCH_VISIBLE_OPTS()
+#undef BCH_OPT
}, *i;
for (i = opt_table;
@@ -186,13 +185,13 @@ int bch_parse_options(struct cache_set_opts *opts, int flags, char *options)
struct bch_opt_result res = parse_one_opt(p);
switch (res.opt) {
-#define CACHE_SET_OPT(_name, _choices, _min, _max, _sb_opt, _perm) \
+#define BCH_OPT(_name, _choices, _min, _max, _sb_opt, _perm) \
case Opt_##_name: \
opts->_name = res.val; \
break;
- CACHE_SET_VISIBLE_OPTS()
-#undef CACHE_SET_OPT
+ BCH_VISIBLE_OPTS()
+#undef BCH_OPT
case Opt_bad_opt:
return -EINVAL;