docs/sysfs: show() methods should use scnprintf().
authorBart Van Assche <bvanassche@acm.org>
Tue, 21 Dec 2010 12:09:47 +0000 (13:09 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 Feb 2011 23:10:18 +0000 (15:10 -0800)
commitd3f70befd9a6ab79413f303109e2c701472e2785
tree1a271b9744ac3b42355026e2cef7d9f97f9e8537
parent5480bcdd60603f834b7c0c252213ca1932c28bfc
docs/sysfs: show() methods should use scnprintf().

Since snprintf() may return a value that exceeds its second argument,
show() methods should use scnprintf() instead of snprintf(). This patch
updates the example in the sysfs documentation accordingly.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/filesystems/sysfs.txt