bcachefs: Ensure sysfs show fns print a newline
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
75c8d0305a
commit
42796f74f4
@ -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; \
|
||||
\
|
||||
|
Loading…
Reference in New Issue
Block a user