Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 035ed7a4 authored by Thomas Maier's avatar Thomas Maier Committed by Greg Kroah-Hartman
Browse files

sysfs: sysfs_write_file() writes zero terminated data



since most of the files in sysfs are text files,
it would be nice, if the "store" function called
during sysfs_write_file() gets a zero terminated
string / data.
The current implementation seems not to ensure this.
(But only if it is the first time the zeroed buffer
page is allocated.)

So the buffer can be scanned by sscanf() easily,
for example.

This patch simply sets a \0 char behind the
data in buffer->page.

Signed-off-by: default avatarThomas Maier <balagi@justmail.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 06a4bcae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment