Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235455
b: refs/heads/master
c: d3f70be
h: refs/heads/master
i:
  235453: f766009
  235451: c6d3e09
  235447: 1eda443
  235439: 1b27a41
  235423: 0a1a97b
  235391: 9f50e03
v: v3
  • Loading branch information
Bart Van Assche authored and Greg Kroah-Hartman committed Feb 3, 2011
1 parent d52e44f commit 8e6dbc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5480bcdd60603f834b7c0c252213ca1932c28bfc
refs/heads/master: d3f70befd9a6ab79413f303109e2c701472e2785
6 changes: 3 additions & 3 deletions trunk/Documentation/filesystems/sysfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down

0 comments on commit 8e6dbc4

Please sign in to comment.