]> git.baikalelectronics.ru Git - kernel.git/commit
proc: Add a way to make network proc files writable
authorDavid Howells <dhowells@redhat.com>
Fri, 18 May 2018 10:46:15 +0000 (11:46 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 18 May 2018 10:46:15 +0000 (11:46 +0100)
commit7f4a6c171bc3c8974371655cd5c5a95c945e538b
treebf7b7051f76e961a082819f5eb126384495d0a89
parent5fafb2ec57c588d73da59a46278502d8728d68ee
proc: Add a way to make network proc files writable

Provide two extra functions, proc_create_net_data_write() and
proc_create_net_single_write() that act like their non-write versions but
also set a write method in the proc_dir_entry struct.

An internal simple write function is provided that will copy its buffer and
hand it to the pde->write() method if available (or give an error if not).
The buffer may be modified by the write method.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/proc/generic.c
fs/proc/internal.h
fs/proc/proc_net.c
include/linux/proc_fs.h