https://github.com/torvalds/linux
Revision 7bd4650895137760f6c686d06ca2bc174e3c861c authored by Wagner Ferenc on 07 December 2007, 07:40:28 UTC, committed by Jeff Garzik on 07 December 2007, 20:00:18 UTC
From: Wagner Ferenc <wferi@niif.hu>

Also remove trailing spaces from multivalued files.

This fixes output like for example:

$ od -c /sys/class/net/bond0/bonding/slaves
0000000   e   t   h   -   l   e   f   t       e   t   h   -   r   i   g
0000020   h   t      \n  \0
0000025

It mostly entails deleting '+1'-s after sprintf() calls: the return value
of sprintf is the number of characters printed, without the closing NUL,
ie. exactly what the sysfs interface requires.  The three multivalue
cases are different, because they also have to swallow back a trailing
space.

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
1 parent 2c5ea0f
History
Tip revision: 7bd4650895137760f6c686d06ca2bc174e3c861c authored by Wagner Ferenc on 07 December 2007, 07:40:28 UTC
bonding: Remove trailing NULs from sysfs interface.
Tip revision: 7bd4650
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
.gitignore -rw-r--r-- 628 bytes
.mailmap -rw-r--r-- 3.6 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 90.1 KB
Kbuild -rw-r--r-- 1.6 KB
MAINTAINERS -rw-r--r-- 91.6 KB
Makefile -rw-r--r-- 52.0 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top