Lines Matching refs:ctl_table
33 struct ctl_table sysctl_mount_point[] = {
53 return head->ctl_table[0].child == sysctl_mount_point; in is_empty_dir()
58 dir->header.ctl_table[0].child = sysctl_mount_point; in set_empty_dir()
64 dir->header.ctl_table[0].child = NULL; in clear_empty_dir()
76 static struct ctl_table root_table[] = {
87 .ctl_table = root_table }},
98 struct ctl_table **pentry);
106 pr_cont("%s/", dir->header.ctl_table[0].procname); in sysctl_print_dir()
120 static struct ctl_table *find_entry(struct ctl_table_header **phead, in find_entry()
124 struct ctl_table *entry; in find_entry()
135 entry = &head->ctl_table[ctl_node - head->node]; in find_entry()
151 static int insert_entry(struct ctl_table_header *head, struct ctl_table *entry) in insert_entry()
153 struct rb_node *node = &head->node[entry - head->ctl_table].node; in insert_entry()
161 struct ctl_table *parent_entry; in insert_entry()
169 parent_entry = &parent_head->ctl_table[parent_node - parent_head->node]; in insert_entry()
190 static void erase_entry(struct ctl_table_header *head, struct ctl_table *entry) in erase_entry()
192 struct rb_node *node = &head->node[entry - head->ctl_table].node; in erase_entry()
199 struct ctl_node *node, struct ctl_table *table) in init_header()
201 head->ctl_table = table; in init_header()
213 struct ctl_table *entry; in init_header()
224 struct ctl_table *entry; in erase_header()
226 list_for_each_table_entry(entry, head->ctl_table) in erase_header()
232 struct ctl_table *entry; in insert_header()
240 if (header->ctl_table == sysctl_mount_point) { in insert_header()
251 list_for_each_table_entry(entry, header->ctl_table) { in insert_header()
261 if (header->ctl_table == sysctl_mount_point) in insert_header()
349 static struct ctl_table *lookup_entry(struct ctl_table_header **phead, in lookup_entry()
354 struct ctl_table *entry; in lookup_entry()
379 struct ctl_table_header **phead, struct ctl_table **pentry) in first_entry()
382 struct ctl_table *entry = NULL; in first_entry()
390 entry = &head->ctl_table[ctl_node - head->node]; in first_entry()
396 static void next_entry(struct ctl_table_header **phead, struct ctl_table **pentry) in next_entry()
399 struct ctl_table *entry = *pentry; in next_entry()
400 struct ctl_node *ctl_node = &head->node[entry - head->ctl_table]; in next_entry()
410 entry = &head->ctl_table[ctl_node - head->node]; in next_entry()
432 static int sysctl_perm(struct ctl_table_header *head, struct ctl_table *table, int op) in sysctl_perm()
446 struct ctl_table_header *head, struct ctl_table *table) in proc_sys_make_inode()
519 struct ctl_table *p; in proc_sys_lookup()
562 struct ctl_table *table = PROC_I(inode)->sysctl_entry; in proc_sys_call_handler()
636 struct ctl_table *table = PROC_I(inode)->sysctl_entry; in proc_sys_open()
654 struct ctl_table *table = PROC_I(inode)->sysctl_entry; in proc_sys_poll()
685 struct ctl_table *table) in proc_sys_fill_cache()
734 struct ctl_table *table) in proc_sys_link_fill_cache()
752 static int scan(struct ctl_table_header *head, struct ctl_table *table, in scan()
776 struct ctl_table *entry; in proc_sys_readdir()
809 struct ctl_table *table; in proc_sys_permission()
854 struct ctl_table *table = PROC_I(inode)->sysctl_entry; in proc_sys_getattr()
953 struct ctl_table *entry; in find_subdir()
966 struct ctl_table *table; in new_dir()
972 sizeof(struct ctl_table)*2 + namelen + 1, in new_dir()
978 table = (struct ctl_table *)(node + 1); in new_dir()
1059 procname = dir->header.ctl_table[0].procname; in xlate_dir()
1064 struct ctl_table **pentry) in sysctl_follow_link()
1069 struct ctl_table *entry; in sysctl_follow_link()
1096 static int sysctl_err(const char *path, struct ctl_table *table, char *fmt, ...) in sysctl_err()
1112 static int sysctl_check_table_array(const char *path, struct ctl_table *table) in sysctl_check_table_array()
1130 static int sysctl_check_table(const char *path, struct ctl_table *table) in sysctl_check_table()
1132 struct ctl_table *entry; in sysctl_check_table()
1166 static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table *table, in new_links()
1169 struct ctl_table *link_table, *entry, *link; in new_links()
1184 sizeof(struct ctl_table)*(nr_entries + 1) + in new_links()
1192 link_table = (struct ctl_table *)(node + nr_entries); in new_links()
1212 struct ctl_table *table, struct ctl_table_root *link_root) in get_links()
1215 struct ctl_table *entry, *link; in get_links()
1253 if (get_links(core_parent, head->ctl_table, head->root)) in insert_links()
1259 links = new_links(core_parent, head->ctl_table, head->root); in insert_links()
1267 if (get_links(core_parent, head->ctl_table, head->root)) { in insert_links()
1324 const char *path, struct ctl_table *table) in __register_sysctl_table()
1330 struct ctl_table *entry; in __register_sysctl_table()
1399 struct ctl_table_header *register_sysctl(const char *path, struct ctl_table *table) in register_sysctl()
1426 void __init __register_sysctl_init(const char *path, struct ctl_table *table, in __register_sysctl_init()
1451 static int count_subheaders(struct ctl_table *table) in count_subheaders()
1455 struct ctl_table *entry; in count_subheaders()
1472 struct ctl_table *table) in register_leaf_sysctl_tables()
1474 struct ctl_table *ctl_table_arg = NULL; in register_leaf_sysctl_tables()
1475 struct ctl_table *entry, *files; in register_leaf_sysctl_tables()
1490 struct ctl_table *new; in register_leaf_sysctl_tables()
1491 files = kcalloc(nr_files + 1, sizeof(struct ctl_table), in register_leaf_sysctl_tables()
1559 const struct ctl_path *path, struct ctl_table *table) in __register_sysctl_paths()
1561 struct ctl_table *ctl_table_arg = table; in __register_sysctl_paths()
1609 struct ctl_table *table = subh->ctl_table_arg; in __register_sysctl_paths()
1629 struct ctl_table *table) in register_sysctl_paths()
1645 struct ctl_table_header *register_sysctl_table(struct ctl_table *table) in register_sysctl_table()
1653 int __register_sysctl_base(struct ctl_table *base_table) in __register_sysctl_base()
1668 struct ctl_table *entry; in put_links()
1677 list_for_each_table_entry(entry, header->ctl_table) { in put_links()
1679 struct ctl_table *link; in put_links()
1738 struct ctl_table *table = subh->ctl_table_arg; in unregister_sysctl_table()