From 8e6dbc4eb8560bf74e434c9c2b756ae3a0384dd7 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 21 Dec 2010 13:09:47 +0100 Subject: [PATCH] --- yaml --- r: 235455 b: refs/heads/master c: d3f70befd9a6ab79413f303109e2c701472e2785 h: refs/heads/master i: 235453: f766009bae1d1caf55676b026e32f0f3d6ff9081 235451: c6d3e09bad85797fccafb222403eaa330c8b69f8 235447: 1eda4433d4dbcfa649924db92214a11d82f3ca36 235439: 1b27a416a211e3ada59ecadd511861b931cd0e71 235423: 0a1a97bc33f4f02839d38a1a6ea869159c52ac80 235391: 9f50e03a80051b6a6e37b7b1e76ade220a56663b v: v3 --- [refs] | 2 +- trunk/Documentation/filesystems/sysfs.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index d757eca54a8a..bdca31f3c4d3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5480bcdd60603f834b7c0c252213ca1932c28bfc +refs/heads/master: d3f70befd9a6ab79413f303109e2c701472e2785 diff --git a/trunk/Documentation/filesystems/sysfs.txt b/trunk/Documentation/filesystems/sysfs.txt index 2ed95f9b770a..f806e50aaa63 100644 --- a/trunk/Documentation/filesystems/sysfs.txt +++ b/trunk/Documentation/filesystems/sysfs.txt @@ -210,9 +210,9 @@ Other notes: is 4096. - show() methods should return the number of bytes printed into the - buffer. This is the return value of snprintf(). + buffer. This is the return value of scnprintf(). -- show() should always use snprintf(). +- show() should always use scnprintf(). - store() should return the number of bytes used from the buffer. If the 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: static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf) { - return snprintf(buf, PAGE_SIZE, "%s\n", dev->name); + return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name); } static ssize_t store_name(struct device *dev, struct device_attribute *attr,