projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75c8d03
)
bcachefs: Ensure sysfs show fns print a newline
author
Kent Overstreet
<kent.overstreet@gmail.com>
Fri, 15 Apr 2022 00:30:30 +0000
(20:30 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:31 +0000
(17:09 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/sysfs.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/sysfs.c
b/fs/bcachefs/sysfs.c
index c0cc6e9a3e0550193a91c85cefcb9e08a9177e3d..24180d98fe81a46de17731b671c8671a5f3df175 100644
(file)
--- a/
fs/bcachefs/sysfs.c
+++ b/
fs/bcachefs/sysfs.c
@@
-55,6
+55,9
@@
static ssize_t fn ## _show(struct kobject *kobj, struct attribute *attr,\
struct printbuf out = PRINTBUF; \
ssize_t ret = fn ## _to_text(&out, kobj, attr); \
\
+ if (out.pos && out.buf[out.pos - 1] != '\n') \
+ pr_newline(&out); \
+ \
if (!ret && out.allocation_failure) \
ret = -ENOMEM; \
\