summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorIntegral <integral@archlinuxcn.org>2025-04-06 23:26:59 +0800
committerKent Overstreet <kent.overstreet@linux.dev>2025-05-21 20:14:08 -0400
commit84ccd47d265579dd23768e69b5204801ad6b5eca (patch)
tree712fc114d5bb21762ae38c768b8548703a46bd3d /fs
parent0e790469bf3044022cb02025abdae775c9908ca8 (diff)
bcachefs: split error messages of invalid compression into two lines
When an invalid compression type or level is passed as an argument to `--compression`, two error messages are squashed into one line: > bcachefs format --compression=lzo bcachefs-comp.img invalid option: invalid compression typecompression: parse error > bcachefs format --compression=lz4:16 bcachefs-comp.img invalid option: invalid compression levelcompression: parse error To resolve this issue, add a newline character at the end of the first error message to separate them into two lines. Signed-off-by: Integral <integral@archlinuxcn.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/compress.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/compress.c b/fs/bcachefs/compress.c
index 28ed32449913..d68c3c7896a3 100644
--- a/fs/bcachefs/compress.c
+++ b/fs/bcachefs/compress.c
@@ -714,7 +714,7 @@ int bch2_opt_compression_parse(struct bch_fs *c, const char *_val, u64 *res,
ret = match_string(bch2_compression_opts, -1, type_str);
if (ret < 0 && err)
- prt_str(err, "invalid compression type");
+ prt_str(err, "invalid compression type\n");
if (ret < 0)
goto err;
@@ -729,7 +729,7 @@ int bch2_opt_compression_parse(struct bch_fs *c, const char *_val, u64 *res,
if (!ret && level > 15)
ret = -EINVAL;
if (ret < 0 && err)
- prt_str(err, "invalid compression level");
+ prt_str(err, "invalid compression level\n");
if (ret < 0)
goto err;