1 /* cf-sysctl.c: Control parameters
3 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #include <linux/module.h>
13 #include <linux/init.h>
14 #include <linux/sysctl.h>
17 static struct ctl_table_header *cachefiles_sysctl;
20 * Something that isn't CTL_ANY, CTL_NONE or a value that may clash.
21 * Use the same values as fs/nfs/sysctl.c
23 #define CTL_UNNUMBERED -2
25 static ctl_table cachefiles_sysctl_table[] = {
27 .ctl_name = CTL_UNNUMBERED,
29 .data = &cachefiles_debug,
30 .maxlen = sizeof(unsigned long),
32 .proc_handler = &proc_doulongvec_minmax
37 static ctl_table cachefiles_sysctl_dir[] = {
39 .ctl_name = CTL_UNNUMBERED,
40 .procname = "cachefiles",
43 .child = cachefiles_sysctl_table
48 static ctl_table cachefiles_sysctl_root[] = {
53 .child = cachefiles_sysctl_dir,
58 int __init cachefiles_sysctl_init(void)
60 cachefiles_sysctl = register_sysctl_table(cachefiles_sysctl_root, 0);
61 if (!cachefiles_sysctl)
66 void __exit cachefiles_sysctl_cleanup(void)
68 unregister_sysctl_table(cachefiles_sysctl);