diff options
Diffstat (limited to 'Documentation/filesystems/sysfs.txt')
-rw-r--r-- | Documentation/filesystems/sysfs.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt index 2ed95f9b770a..f806e50aaa63 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt | |||
@@ -210,9 +210,9 @@ Other notes: | |||
210 | is 4096. | 210 | is 4096. |
211 | 211 | ||
212 | - show() methods should return the number of bytes printed into the | 212 | - show() methods should return the number of bytes printed into the |
213 | buffer. This is the return value of snprintf(). | 213 | buffer. This is the return value of scnprintf(). |
214 | 214 | ||
215 | - show() should always use snprintf(). | 215 | - show() should always use scnprintf(). |
216 | 216 | ||
217 | - store() should return the number of bytes used from the buffer. If the | 217 | - store() should return the number of bytes used from the buffer. If the |
218 | entire buffer has been used, just return the count argument. | 218 | entire buffer has been used, just return the count argument. |
@@ -231,7 +231,7 @@ A very simple (and naive) implementation of a device attribute is: | |||
231 | static ssize_t show_name(struct device *dev, struct device_attribute *attr, | 231 | static ssize_t show_name(struct device *dev, struct device_attribute *attr, |
232 | char *buf) | 232 | char *buf) |
233 | { | 233 | { |
234 | return snprintf(buf, PAGE_SIZE, "%s\n", dev->name); | 234 | return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name); |
235 | } | 235 | } |
236 | 236 | ||
237 | static ssize_t store_name(struct device *dev, struct device_attribute *attr, | 237 | static ssize_t store_name(struct device *dev, struct device_attribute *attr, |