sysctl: introduce new proc handler proc_dobool
[ Upstream commit a2071573d6346819cc4e5787b4206f2184985160 ] This is to let bool variable could be correctly displayed in big/little endian sysctl procfs. sizeof(bool) is arch dependent, proc_dobool should work in all arches. Suggested-by: Pan Xinhui <xinhui@linux.vnet.ibm.com> Signed-off-by: Jia He <hejianet@gmail.com> [thuth: rebased the patch to the current kernel version] Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
130dcbf77a
commit
f469e60f9a
@@ -55,6 +55,8 @@ typedef int proc_handler(struct ctl_table *ctl, int write, void *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
|
||||
int proc_dostring(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int proc_dobool(struct ctl_table *table, int write, void *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
int proc_dointvec(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int proc_douintvec(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int proc_dointvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
|
Reference in New Issue
Block a user