Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F131746101
D38159.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
717 B
Referenced Files
None
Subscribers
None
D38159.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h
--- a/sys/compat/linuxkpi/common/include/linux/sysfs.h
+++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h
@@ -314,6 +314,24 @@
return (i);
}
+static inline int
+sysfs_emit_at(char *buf, int at, const char *fmt, ...)
+{
+ va_list args;
+ int i;
+
+ if (!buf || offset_in_page(buf) || at < 0 || at >= PAGE_SIZE) {
+ pr_warn("invalid sysfs_emit: buf:%p at:%d\n", buf, at);
+ return (0);
+ }
+
+ va_start(args, fmt);
+ i = vscnprintf(buf + at, PAGE_SIZE - at, fmt, args);
+ va_end(args);
+
+ return (i);
+}
+
#define sysfs_attr_init(attr) do {} while(0)
#endif /* _LINUXKPI_LINUX_SYSFS_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 11, 8:35 PM (20 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23591700
Default Alt Text
D38159.diff (717 B)
Attached To
Mode
D38159: linuxkpi: Add `sysfs_emit_at()` in <linux/sysfs.h>
Attached
Detach File
Event Timeline
Log In to Comment