diff options
| author | Integral <integral@archlinuxcn.org> | 2025-04-06 22:53:28 +0800 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-21 20:14:07 -0400 |
| commit | 0e790469bf3044022cb02025abdae775c9908ca8 (patch) | |
| tree | f2a5f7247e9cafe5e45f19d75a0fcc5804e8b59f /fs/bcachefs/compress.c | |
| parent | bcachefs: move_data_phys: stats are not required (diff) | |
| download | linux-0e790469bf3044022cb02025abdae775c9908ca8.tar.gz linux-0e790469bf3044022cb02025abdae775c9908ca8.zip | |
bcachefs: early return for negative values when parsing BCH_OPT_UINT
Currently, when passing a negative integer as argument, the error
message is "too big" due to casting to an unsigned integer:
> bcachefs format --block_size=-1 bcachefs.img
invalid option: block_size: too big (max 65536)
When negative value in argument detected, return early before
calling bch2_opt_validate().
A new error code `BCH_ERR_option_negative` is added.
Signed-off-by: Integral <integral@archlinuxcn.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/compress.c')
0 files changed, 0 insertions, 0 deletions
