summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-04-02 16:30:37 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-03-13 11:34:24 -0400
commitff7a46ece17ce4ae4471fd616c4ebc57c8573d60 (patch)
treead61c33a8e7d5a7a156c463085660c892fdc0c5c
parentd027ec3bf9db1090cdbf04197e06fbdad5f99a05 (diff)
bcachefs: Fix pr_buf() calls
In a few places we were passing a variable to pr_buf() for the format string - oops. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r--fs/bcachefs/opts.c2
-rw-r--r--fs/bcachefs/util.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c
index 77fbb7d2194e..385451ef865e 100644
--- a/fs/bcachefs/opts.c
+++ b/fs/bcachefs/opts.c
@@ -324,7 +324,7 @@ void bch2_opt_to_text(struct printbuf *out,
if (flags & OPT_SHOW_FULL_LIST)
bch2_string_opt_to_text(out, opt->choices, v);
else
- pr_buf(out, opt->choices[v]);
+ pr_buf(out, "%s", opt->choices[v]);
break;
case BCH_OPT_FN:
opt->to_text(out, c, sb, v);
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h
index 085f1c357383..1629d279f494 100644
--- a/fs/bcachefs/util.h
+++ b/fs/bcachefs/util.h
@@ -388,7 +388,7 @@ static inline void pr_uuid(struct printbuf *out, u8 *uuid)
char uuid_str[40];
uuid_unparse_lower(uuid, uuid_str);
- pr_buf(out, uuid_str);
+ pr_buf(out, "%s", uuid_str);
}
int bch2_strtoint_h(const char *, int *);