diff options
author | Simon Rettberg | 2024-01-16 16:40:39 +0100 |
---|---|---|
committer | Simon Rettberg | 2024-01-16 16:40:39 +0100 |
commit | 531a83dfa023fc7ad4bac951bcef5ec4c1cd8bf1 (patch) | |
tree | 2f9131d452ab505ff277989218ec6a75f524399a | |
parent | Turn modpost errors into warnings, default changed between 6.1 and 6.6 (diff) | |
download | xloop-531a83dfa023fc7ad4bac951bcef5ec4c1cd8bf1.tar.gz xloop-531a83dfa023fc7ad4bac951bcef5ec4c1cd8bf1.tar.xz xloop-531a83dfa023fc7ad4bac951bcef5ec4c1cd8bf1.zip |
Don't use sysfs_emit in case we apply an offset to buf
It's a function meant for safety, so it refuses to work with pointers
that don't start at a page boundary.
-rw-r--r-- | src/kernel/xloop_main_6.6.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/xloop_main_6.6.c b/src/kernel/xloop_main_6.6.c index 85acec5..871ce7b 100644 --- a/src/kernel/xloop_main_6.6.c +++ b/src/kernel/xloop_main_6.6.c @@ -444,7 +444,8 @@ static ssize_t xloop_attr_file_fmt_type_show(struct xloop_device *xlo, char *buf ssize_t len = 0; len = xloop_file_fmt_print_type(xlo->xlo_fmt->file_fmt_type, buf); - len += sysfs_emit(buf + len, "\n"); + /* do not use sysfs_emit here, doesn't work with offset */ + len += sprintf(buf + len, "\n"); return len; } |