lkml.org 
[lkml]   [2018]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/5] ipc: Show ranges of msgmni and shmmni with CTL_FLAGS_SHOW_RANGE
Date
The CTL_FLAGS_SHOW_RANGE flag is added to the msgmni and shmmni
ctl_table entries to show their ranges. Two range table entries are
reserved for the new *_range sysctl parameters.

Signed-off-by: Waiman Long <longman@redhat.com>
---
ipc/ipc_sysctl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 2c03f57..3b4d7cd 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -143,7 +143,7 @@ static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
.proc_handler = proc_ipc_dointvec_minmax,
.extra1 = &zero,
.extra2 = &ipc_mni,
- .flags = CTL_FLAGS_CLAMP_RANGE,
+ .flags = CTL_FLAGS_CLAMP_RANGE|CTL_FLAGS_SHOW_RANGE,
},
{
.procname = "shm_rmid_forced",
@@ -171,7 +171,7 @@ static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
.proc_handler = proc_ipc_dointvec_minmax,
.extra1 = &zero,
.extra2 = &ipc_mni,
- .flags = CTL_FLAGS_CLAMP_RANGE,
+ .flags = CTL_FLAGS_CLAMP_RANGE|CTL_FLAGS_SHOW_RANGE,
},
{
.procname = "auto_msgmni",
@@ -228,6 +228,7 @@ static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
.extra2 = &int_max,
},
#endif
+ CTL_RESERVE_RANGES(2)
{}
};

--
1.8.3.1
\
 
 \ /
  Last update: 2018-03-07 21:36    [W:0.101 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site