diff options
author | Jia He <hejianet@gmail.com> | 2021-08-03 13:59:36 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2021-08-17 18:47:53 +0300 |
commit | a2071573d6346819cc4e5787b4206f2184985160 (patch) | |
tree | 29b4e98e0d31a6e0e2516595818769c216f5e9bb /include/linux/sysctl.h | |
parent | 5c11720767f70d34357d00a15ba5a0ad052c40fe (diff) | |
download | linux-a2071573d6346819cc4e5787b4206f2184985160.tar.xz |
sysctl: introduce new proc handler proc_dobool
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>
Diffstat (limited to 'include/linux/sysctl.h')
-rw-r--r-- | include/linux/sysctl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index d99ca99837de..1fa2b69c6fc3 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -48,6 +48,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 *); |