diff options
| author | Joel Granados <joel.granados@kernel.org> | 2025-10-08 17:12:37 +0300 |
|---|---|---|
| committer | Joel Granados <joel.granados@kernel.org> | 2025-11-27 17:45:37 +0300 |
| commit | c5b4c183f7aeb46cd27ddea9dab776655b8d7034 (patch) | |
| tree | 01938313b56d8d580cf6ce8ffc60721677331681 /include | |
| parent | 1aa53326e1df68f8e7191053a3fd712449d444cb (diff) | |
| download | linux-c5b4c183f7aeb46cd27ddea9dab776655b8d7034.tar.xz | |
sysctl: Allow custom converters from outside sysctl
The new non-static proc_dointvec_conv forwards a custom converter
function to do_proc_dointvec from outside the sysctl scope. Rename the
do_proc_dointvec call points so any future changes to proc_dointvec_conv
are propagated in sysctl.c This is a preparation commit that allows the
integer jiffie converter functions to move out of kernel/sysctl.c.
Signed-off-by: Joel Granados <joel.granados@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/sysctl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 436191e569da..a48273757c99 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -68,6 +68,10 @@ int proc_dostring(const struct ctl_table *, int, void *, size_t *, loff_t *); int proc_dobool(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); int proc_dointvec(const struct ctl_table *, int, void *, size_t *, loff_t *); +int proc_dointvec_conv(const struct ctl_table *table, int dir, void *buffer, + size_t *lenp, loff_t *ppos, + int (*conv)(bool *negp, unsigned long *u_ptr, int *k_ptr, + int dir, const struct ctl_table *table)); int proc_douintvec(const struct ctl_table *, int, void *, size_t *, loff_t *); int proc_dointvec_minmax(const struct ctl_table *, int, void *, size_t *, loff_t *); int proc_douintvec_minmax(const struct ctl_table *table, int write, void *buffer, |
