diff mbox

[5/5] ipc: Show ranges of msgmni and shmmni with CTL_FLAGS_SHOW_RANGE

Message ID 1520454869-13871-6-git-send-email-longman@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Waiman Long March 7, 2018, 8:34 p.m. UTC
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 mbox

Patch

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)
 	{}
 };