summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2024-01-16 16:40:39 +0100
committerSimon Rettberg2024-01-16 16:40:39 +0100
commit531a83dfa023fc7ad4bac951bcef5ec4c1cd8bf1 (patch)
tree2f9131d452ab505ff277989218ec6a75f524399a /src
parentTurn modpost errors into warnings, default changed between 6.1 and 6.6 (diff)
downloadxloop-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.
Diffstat (limited to 'src')
-rw-r--r--src/kernel/xloop_main_6.6.c3
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;
}