Add register_sysctl_table_path function
Subsystems (3)
PATCH 1/4 Add register_sysctl_table_path function
From: Olaf Kirch <[email protected]>
Subject: Add register_sysctl_table_path function
There are a number of modules that register a sysctl table somewhere deeply nested in the sysctl hierarchy, such as fs/nfs, fs/xfs, dev/cdrom, etc.
They all specify several dummy ctl_tables for the path name. This patch implements register_sysctl_table_path that takes an additional path name, and makes up dummy sysctl nodes for each component.
include/linux/sysctl.h | 10 ++++++ kernel/sysctl.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 87 insertions(+), 2 deletions(-)
include/linux/sysctl.h +10 -0
@@ -1006,8 +1006,18 @@ struct ctl_table_header struct completion *unregistering; }; +/* struct ctl_path describes where in the hierarchy a table is added */ +struct ctl_path +{ +int ctl_name; +const char *procname; +mode_t mode; +}; +struct ctl_table_header *register_sysctl_table (ctl_table * table,int insert_at_head); +struct ctl_table_header *register_sysctl_table_path (ctl_table *table, +struct ctl_path *path);void unregister_sysctl_table (struct ctl_table_header * table);#else /* __KERNEL__ */
kernel/sysctl.c +77 -2
110 lines not on this page · raw message
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs