We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1da40c2 commit fda8c90Copy full SHA for fda8c90
Documentation/filesystems/sysfs.rst
@@ -263,7 +263,7 @@ A very simple (and naive) implementation of a device attribute is::
263
static ssize_t show_name(struct device *dev, struct device_attribute *attr,
264
char *buf)
265
{
266
- return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name);
+ return sysfs_emit(buf, "%s\n", dev->name);
267
}
268
269
static ssize_t store_name(struct device *dev, struct device_attribute *attr,
0 commit comments