diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-04 13:03:24 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:40 -0500 |
commit | 56ec287d30ba2f8dec70b642e9b2c108116cbfd9 (patch) | |
tree | e093d2583804f5b88a73141477db18f438cc133f /fs/bcachefs/opts.c | |
parent | 6e92d15546944d9e2af8e7248a3a399dbd6fce0e (diff) |
bcachefs: BCH_ERR_opt_parse_error
Continuing the project of replacing generic error codes with more
specific ones.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.c')
-rw-r--r-- | fs/bcachefs/opts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c index 8dd4046cca41..8e6f230eac38 100644 --- a/fs/bcachefs/opts.c +++ b/fs/bcachefs/opts.c @@ -279,14 +279,14 @@ int bch2_opt_validate(const struct bch_option *opt, u64 v, struct printbuf *err) if (err) prt_printf(err, "%s: not a multiple of 512", opt->attr.name); - return -EINVAL; + return -BCH_ERR_opt_parse_error; } if ((opt->flags & OPT_MUST_BE_POW_2) && !is_power_of_2(v)) { if (err) prt_printf(err, "%s: must be a power of two", opt->attr.name); - return -EINVAL; + return -BCH_ERR_opt_parse_error; } if (opt->fn.validate) |