summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/compress.c
diff options
context:
space:
mode:
authorIntegral <integral@archlinuxcn.org>2025-04-08 18:31:29 +0800
committerKent Overstreet <kent.overstreet@linux.dev>2025-05-21 20:14:10 -0400
commitdd1b99f7060f781bea9973036ee96daa856f08c0 (patch)
tree538b4ba12866eee3d25b487a570fe33ba0533639 /fs/bcachefs/compress.c
parentbcachefs: split error messages of invalid compression into two lines (diff)
downloadlinux-dd1b99f7060f781bea9973036ee96daa856f08c0.tar.gz
linux-dd1b99f7060f781bea9973036ee96daa856f08c0.zip
bcachefs: indent error messages of invalid compression
This patch uses printbuf_indent_add_nextline() to set a consistent indentation level for error messages of invalid compression. In my previous patch [1], the newline is added by using '\n' in the argument of prt_str(). This patch replaces prt_str() with prt_printf() to make indentation level work correctly. [1] Link: https://lore.kernel.org/20250406152659.205997-2-integral@archlinuxcn.org Signed-off-by: Integral <integral@archlinuxcn.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/compress.c')
-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 d68c3c7896a3..1bca61d17092 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\n");
+ prt_printf(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\n");
+ prt_printf(err, "invalid compression level\n");
if (ret < 0)
goto err;