summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-06-03 03:38:21 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-03 03:38:21 -0700
commitc2e2d4f7c91100686c8d9987299058307452ddd6 (patch)
tree26a5ad76b5144648a7d5306f911ae3b15515c747
parented2110ce4db8a25d186a00f6a338170ee7ca2cd7 (diff)
parent6f79387d2321847e687b61f9711606b58f23b859 (diff)
Merge bk://ldm.bkbits.net/linux-2.5-core
into home.transmeta.com:/home/torvalds/v2.5/linux
-rw-r--r--arch/i386/kernel/smp.c11
-rw-r--r--arch/ia64/kernel/smp.c18
-rw-r--r--arch/ppc64/kernel/smp.c11
-rw-r--r--drivers/ide/ide-proc.c36
-rw-r--r--drivers/ide/ide.c6
-rw-r--r--fs/bio.c2
-rw-r--r--fs/dquot.c92
-rw-r--r--fs/libfs.c2
-rw-r--r--include/asm-i386/smp.h1
-rw-r--r--include/asm-ia64/smp.h2
-rw-r--r--include/asm-ppc64/smp.h1
-rw-r--r--include/asm-x86_64/smp.h1
-rw-r--r--include/linux/ide.h1
-rw-r--r--include/linux/smp.h1
-rw-r--r--kernel/exec_domain.c82
-rw-r--r--kernel/resource.c15
-rw-r--r--kernel/sysctl.c716
17 files changed, 727 insertions, 271 deletions
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index 335a0404ee3c..1e2e7405a6d6 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -461,17 +461,6 @@ void smp_send_reschedule(int cpu)
}
/*
- * this function sends a reschedule IPI to all (other) CPUs.
- * This should only be used if some 'global' task became runnable,
- * such as a RT task, that must be handled now. The first CPU
- * that manages to grab the task will run it.
- */
-void smp_send_reschedule_all(void)
-{
- send_IPI_allbutself(RESCHEDULE_VECTOR);
-}
-
-/*
* Structure and data for smp_call_function(). This is designed to minimise
* static memory requirements. It also looks cleaner.
*/
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 7d192940fbd8..9727272ffb85 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -205,24 +205,6 @@ smp_send_reschedule (int cpu)
platform_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0);
}
-/*
- * This function sends a reschedule IPI to all (other) CPUs. This should only be used if
- * some 'global' task became runnable, such as a RT task, that must be handled now. The
- * first CPU that manages to grab the task will run it.
- */
-void
-smp_send_reschedule_all (void)
-{
- int i;
- int cpu = get_cpu(); /* disable preemption */
-
- for (i = 0; i < NR_CPUS; i++)
- if (cpu_online(i) && i != cpu)
- smp_send_reschedule(i);
- put_cpu();
-}
-
-
void
smp_flush_tlb_all (void)
{
diff --git a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
index 0730f32b6d8e..9a1414445643 100644
--- a/arch/ppc64/kernel/smp.c
+++ b/arch/ppc64/kernel/smp.c
@@ -392,17 +392,6 @@ void smp_send_reschedule(int cpu)
smp_message_pass(cpu, PPC_MSG_RESCHEDULE, 0, 0);
}
-/*
- * this function sends a reschedule IPI to all (other) CPUs.
- * This should only be used if some 'global' task became runnable,
- * such as a RT task, that must be handled now. The first CPU
- * that manages to grab the task will run it.
- */
-void smp_send_reschedule_all(void)
-{
- smp_message_pass(MSG_ALL_BUT_SELF, PPC_MSG_RESCHEDULE, 0, 0);
-}
-
#ifdef CONFIG_XMON
void smp_send_xmon_break(int cpu)
{
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 10d740140a48..c506c043d882 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -712,7 +712,6 @@ void create_proc_ide_drives(ide_hwif_t *hwif)
for (d = 0; d < MAX_DRIVES; d++) {
ide_drive_t *drive = &hwif->drives[d];
- ide_driver_t *driver = drive->driver;
if (!drive->present)
continue;
@@ -720,13 +719,8 @@ void create_proc_ide_drives(ide_hwif_t *hwif)
continue;
drive->proc = proc_mkdir(drive->name, parent);
- if (drive->proc) {
+ if (drive->proc)
ide_add_proc_entries(drive->proc, generic_drive_entries, drive);
- if (driver) {
- ide_add_proc_entries(drive->proc, generic_subdriver_entries, drive);
- ide_add_proc_entries(drive->proc, driver->proc, drive);
- }
- }
sprintf(name,"ide%d/%s", (drive->name[2]-'a')/2, drive->name);
ent = proc_symlink(drive->name, proc_ide_root, name);
if (!ent) return;
@@ -735,34 +729,6 @@ void create_proc_ide_drives(ide_hwif_t *hwif)
EXPORT_SYMBOL(create_proc_ide_drives);
-void recreate_proc_ide_device(ide_hwif_t *hwif, ide_drive_t *drive)
-{
- struct proc_dir_entry *ent;
- struct proc_dir_entry *parent = hwif->proc;
- char name[64];
-
- if (drive->present && !drive->proc) {
- drive->proc = proc_mkdir(drive->name, parent);
- if (drive->proc)
- ide_add_proc_entries(drive->proc, generic_drive_entries, drive);
-
-/*
- * assume that we have these already, however, should test FIXME!
- * if (driver) {
- * ide_add_proc_entries(drive->proc, generic_subdriver_entries, drive);
- * ide_add_proc_entries(drive->proc, driver->proc, drive);
- * }
- *
- */
- sprintf(name,"ide%d/%s", (drive->name[2]-'a')/2, drive->name);
- ent = proc_symlink(drive->name, proc_ide_root, name);
- if (!ent)
- return;
- }
-}
-
-EXPORT_SYMBOL(recreate_proc_ide_device);
-
void destroy_proc_ide_device(ide_hwif_t *hwif, ide_drive_t *drive)
{
ide_driver_t *driver = drive->driver;
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 71f417b91781..2e933dadeeb8 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -2349,8 +2349,10 @@ int ide_register_subdriver (ide_drive_t *drive, ide_driver_t *driver, int versio
}
drive->suspend_reset = 0;
#ifdef CONFIG_PROC_FS
- ide_add_proc_entries(drive->proc, generic_subdriver_entries, drive);
- ide_add_proc_entries(drive->proc, driver->proc, drive);
+ if (drive->driver != &idedefault_driver) {
+ ide_add_proc_entries(drive->proc, generic_subdriver_entries, drive);
+ ide_add_proc_entries(drive->proc, driver->proc, drive);
+ }
#endif
return 0;
}
diff --git a/fs/bio.c b/fs/bio.c
index 87c141f003dc..7223ed886048 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -53,7 +53,7 @@ struct biovec_pool {
* unsigned short
*/
-#define BV(x) { x, "biovec-" #x }
+#define BV(x) { .nr_vecs = x, .name = "biovec-" #x }
static struct biovec_pool bvec_array[BIOVEC_NR_POOLS] = {
BV(1), BV(4), BV(16), BV(64), BV(128), BV(BIO_MAX_PAGES),
};
diff --git a/fs/dquot.c b/fs/dquot.c
index 6ee5cd6af648..34f9417ed71a 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -1348,25 +1348,91 @@ struct quotactl_ops vfs_quotactl_ops = {
};
static ctl_table fs_dqstats_table[] = {
- {FS_DQ_LOOKUPS, "lookups", &dqstats.lookups, sizeof(int), 0444, NULL, &proc_dointvec},
- {FS_DQ_DROPS, "drops", &dqstats.drops, sizeof(int), 0444, NULL, &proc_dointvec},
- {FS_DQ_READS, "reads", &dqstats.reads, sizeof(int), 0444, NULL, &proc_dointvec},
- {FS_DQ_WRITES, "writes", &dqstats.writes, sizeof(int), 0444, NULL, &proc_dointvec},
- {FS_DQ_CACHE_HITS, "cache_hits", &dqstats.cache_hits, sizeof(int), 0444, NULL, &proc_dointvec},
- {FS_DQ_ALLOCATED, "allocated_dquots", &dqstats.allocated_dquots, sizeof(int), 0444, NULL, &proc_dointvec},
- {FS_DQ_FREE, "free_dquots", &dqstats.free_dquots, sizeof(int), 0444, NULL, &proc_dointvec},
- {FS_DQ_SYNCS, "syncs", &dqstats.syncs, sizeof(int), 0444, NULL, &proc_dointvec},
- {},
+ {
+ .ctl_name = FS_DQ_LOOKUPS,
+ .procname = "lookups",
+ .data = &dqstats.lookups,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_DQ_DROPS,
+ .procname = "drops",
+ .data = &dqstats.drops,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_DQ_READS,
+ .procname = "reads",
+ .data = &dqstats.reads,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_DQ_WRITES,
+ .procname = "writes",
+ .data = &dqstats.writes,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_DQ_CACHE_HITS,
+ .procname = "cache_hits",
+ .data = &dqstats.cache_hits,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_DQ_ALLOCATED,
+ .procname = "allocated_dquots",
+ .data = &dqstats.allocated_dquots,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_DQ_FREE,
+ .procname = "free_dquots",
+ .data = &dqstats.free_dquots,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_DQ_SYNCS,
+ .procname = "syncs",
+ .data = &dqstats.syncs,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ { .ctl_name = 0 },
};
static ctl_table fs_table[] = {
- {FS_DQSTATS, "quota", NULL, 0, 0555, fs_dqstats_table},
- {},
+ {
+ .ctl_name = FS_DQSTATS,
+ .procname = "quota",
+ .mode = 0555,
+ .child = fs_dqstats_table,
+ },
+ { .ctl_name = 0 },
};
static ctl_table sys_table[] = {
- {CTL_FS, "fs", NULL, 0, 0555, fs_table},
- {},
+ {
+ .ctl_name = CTL_FS,
+ .procname = "fs",
+ .mode = 0555,
+ .child = fs_table,
+ },
+ { .ctl_name = 0 },
};
/* SLAB cache for dquot structures */
diff --git a/fs/libfs.c b/fs/libfs.c
index 932fd24707ee..2553f5463419 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -336,7 +336,7 @@ int simple_commit_write(struct file *file, struct page *page,
int simple_fill_super(struct super_block *s, int magic, struct tree_descr *files)
{
- static struct super_operations s_ops = {statfs:simple_statfs};
+ static struct super_operations s_ops = {.statfs = simple_statfs};
struct inode *inode;
struct dentry *root;
struct dentry *dentry;
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h
index f72e82945a57..71dd76aa0d83 100644
--- a/include/asm-i386/smp.h
+++ b/include/asm-i386/smp.h
@@ -41,7 +41,6 @@ extern int cpu_sibling_map[];
extern void smp_flush_tlb(void);
extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs);
extern void smp_send_reschedule(int cpu);
-extern void smp_send_reschedule_all(void);
extern void smp_invalidate_rcv(void); /* Process an NMI */
extern void (*mtrr_hook) (void);
extern void zap_low_mappings (void);
diff --git a/include/asm-ia64/smp.h b/include/asm-ia64/smp.h
index 5147ca20d3ac..df4b07cf7f46 100644
--- a/include/asm-ia64/smp.h
+++ b/include/asm-ia64/smp.h
@@ -136,8 +136,6 @@ extern void smp_do_timer (struct pt_regs *regs);
extern int smp_call_function_single (int cpuid, void (*func) (void *info), void *info,
int retry, int wait);
extern void smp_send_reschedule (int cpu);
-extern void smp_send_reschedule_all (void);
-
#endif /* CONFIG_SMP */
#endif /* _ASM_IA64_SMP_H */
diff --git a/include/asm-ppc64/smp.h b/include/asm-ppc64/smp.h
index 0dd474425342..f3cfd38ff0a2 100644
--- a/include/asm-ppc64/smp.h
+++ b/include/asm-ppc64/smp.h
@@ -34,7 +34,6 @@ extern void smp_send_tlb_invalidate(int);
extern void smp_send_xmon_break(int cpu);
struct pt_regs;
extern void smp_message_recv(int, struct pt_regs *);
-extern void smp_send_reschedule_all(void);
#define NO_PROC_ID 0xFF /* No processor magic marker */
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h
index 53ee2b8a8716..a624ef178425 100644
--- a/include/asm-x86_64/smp.h
+++ b/include/asm-x86_64/smp.h
@@ -42,7 +42,6 @@ extern int pic_mode;
extern void smp_flush_tlb(void);
extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs);
extern void smp_send_reschedule(int cpu);
-extern void smp_send_reschedule_all(void);
extern void smp_invalidate_rcv(void); /* Process an NMI */
extern void (*mtrr_hook) (void);
extern void zap_low_mappings(void);
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 706819e9a27c..c6a8f20203ec 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1115,7 +1115,6 @@ typedef struct {
#ifdef CONFIG_PROC_FS
extern void proc_ide_create(void);
extern void proc_ide_destroy(void);
-extern void recreate_proc_ide_device(ide_hwif_t *, ide_drive_t *);
extern void destroy_proc_ide_device(ide_hwif_t *, ide_drive_t *);
extern void destroy_proc_ide_drives(ide_hwif_t *);
extern void create_proc_ide_interfaces(void);
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 194d2f5ecb87..98f235eec967 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -110,7 +110,6 @@ void smp_prepare_boot_cpu(void);
#define smp_call_function(func,info,retry,wait) ({ 0; })
#define on_each_cpu(func,info,retry,wait) ({ func(info); 0; })
static inline void smp_send_reschedule(int cpu) { }
-static inline void smp_send_reschedule_all(void) { }
#define cpu_online_map 1
#define cpu_online(cpu) ({ BUG_ON((cpu) != 0); 1; })
#define num_online_cpus() 1
diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c
index 930968f15a1d..77664a9f6a64 100644
--- a/kernel/exec_domain.c
+++ b/kernel/exec_domain.c
@@ -32,11 +32,12 @@ static u_long ident_map[32] = {
};
struct exec_domain default_exec_domain = {
- "Linux", /* name */
- default_handler, /* lcall7 causes a seg fault. */
- 0, 0, /* PER_LINUX personality. */
- ident_map, /* Identity map signals. */
- ident_map, /* - both ways. */
+ .name = "Linux", /* name */
+ .handler = default_handler, /* lcall7 causes a seg fault. */
+ .pers_low = 0, /* PER_LINUX personality. */
+ .pers_high = 0, /* PER_LINUX personality. */
+ .signal_map = ident_map, /* Identity map signals. */
+ .signal_invmap = ident_map, /* - both ways. */
};
@@ -247,24 +248,65 @@ u_int abi_traceflg;
int abi_fake_utsname;
static struct ctl_table abi_table[] = {
- {ABI_DEFHANDLER_COFF, "defhandler_coff", &abi_defhandler_coff,
- sizeof(int), 0644, NULL, &proc_doulongvec_minmax},
- {ABI_DEFHANDLER_ELF, "defhandler_elf", &abi_defhandler_elf,
- sizeof(int), 0644, NULL, &proc_doulongvec_minmax},
- {ABI_DEFHANDLER_LCALL7, "defhandler_lcall7", &abi_defhandler_lcall7,
- sizeof(int), 0644, NULL, &proc_doulongvec_minmax},
- {ABI_DEFHANDLER_LIBCSO, "defhandler_libcso", &abi_defhandler_libcso,
- sizeof(int), 0644, NULL, &proc_doulongvec_minmax},
- {ABI_TRACE, "trace", &abi_traceflg,
- sizeof(u_int), 0644, NULL, &proc_dointvec},
- {ABI_FAKE_UTSNAME, "fake_utsname", &abi_fake_utsname,
- sizeof(int), 0644, NULL, &proc_dointvec},
- {0}
+ {
+ .ctl_name = ABI_DEFHANDLER_COFF,
+ .procname = "defhandler_coff",
+ .data = &abi_defhandler_coff,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_doulongvec_minmax,
+ },
+ {
+ .ctl_name = ABI_DEFHANDLER_ELF,
+ .procname = "defhandler_elf",
+ .data = &abi_defhandler_elf,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_doulongvec_minmax,
+ },
+ {
+ .ctl_name = ABI_DEFHANDLER_LCALL7,
+ .procname = "defhandler_lcall7",
+ .data = &abi_defhandler_lcall7,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_doulongvec_minmax,
+ },
+ {
+ .ctl_name = ABI_DEFHANDLER_LIBCSO,
+ .procname = "defhandler_libcso",
+ .data = &abi_defhandler_libcso,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_doulongvec_minmax,
+ },
+ {
+ .ctl_name = ABI_TRACE,
+ .procname = "trace",
+ .data = &abi_traceflg,
+ .maxlen = sizeof(u_int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = ABI_FAKE_UTSNAME,
+ .procname = "fake_utsname",
+ .data = &abi_fake_utsname,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ { .ctl_name = 0 }
};
static struct ctl_table abi_root_table[] = {
- {CTL_ABI, "abi", NULL, 0, 0555, abi_table},
- {0}
+ {
+ .ctl_name = CTL_ABI,
+ .procname = "abi",
+ .mode = 0555,
+ .child = abi_table,
+ },
+ { .ctl_name = 0 }
};
static int __init
diff --git a/kernel/resource.c b/kernel/resource.c
index c019f4a5003c..fab5c53d30b7 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -20,8 +20,19 @@
#include <asm/io.h>
-struct resource ioport_resource = { "PCI IO", 0x0000, IO_SPACE_LIMIT, IORESOURCE_IO };
-struct resource iomem_resource = { "PCI mem", 0UL, ~0UL, IORESOURCE_MEM };
+struct resource ioport_resource = {
+ .name = "PCI IO",
+ .start = 0x0000,
+ .end = IO_SPACE_LIMIT,
+ .flags = IORESOURCE_IO,
+};
+
+struct resource iomem_resource = {
+ .name = "PCI mem",
+ .start = 0UL,
+ .end = ~0UL,
+ .flags = IORESOURCE_MEM,
+};
static rwlock_t resource_lock = RW_LOCK_UNLOCKED;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index f4f9a14971af..dadeefbdab1a 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -149,123 +149,408 @@ static void unregister_proc_table(ctl_table *, struct proc_dir_entry *);
/* The default sysctl tables: */
static ctl_table root_table[] = {
- {CTL_KERN, "kernel", NULL, 0, 0555, kern_table},
- {CTL_VM, "vm", NULL, 0, 0555, vm_table},
+ {
+ .ctl_name = CTL_KERN,
+ .procname = "kernel",
+ .mode = 0555,
+ .child = kern_table,
+ },
+ {
+ .ctl_name = CTL_VM,
+ .procname = "vm",
+ .mode = 0555,
+ .child = vm_table,
+ },
#ifdef CONFIG_NET
- {CTL_NET, "net", NULL, 0, 0555, net_table},
+ {
+ .ctl_name = CTL_NET,
+ .procname = "net",
+ .mode = 0555,
+ .child = net_table,
+ },
#endif
- {CTL_PROC, "proc", NULL, 0, 0555, proc_table},
- {CTL_FS, "fs", NULL, 0, 0555, fs_table},
- {CTL_DEBUG, "debug", NULL, 0, 0555, debug_table},
- {CTL_DEV, "dev", NULL, 0, 0555, dev_table},
- {0}
+ {
+ .ctl_name = CTL_PROC,
+ .procname = "proc",
+ .mode = 0555,
+ .child = proc_table,
+ },
+ {
+ .ctl_name = CTL_FS,
+ .procname = "fs",
+ .mode = 0555,
+ .child = fs_table,
+ },
+ {
+ .ctl_name = CTL_DEBUG,
+ .procname = "debug",
+ .mode = 0555,
+ .child = debug_table,
+ },
+ {
+ .ctl_name = CTL_DEV,
+ .procname = "dev",
+ .mode = 0555,
+ .child = dev_table,
+ },
+ { .ctl_name = 0 }
};
static ctl_table kern_table[] = {
- {KERN_OSTYPE, "ostype", system_utsname.sysname, 64,
- 0444, NULL, &proc_doutsstring, &sysctl_string},
- {KERN_OSRELEASE, "osrelease", system_utsname.release, 64,
- 0444, NULL, &proc_doutsstring, &sysctl_string},
- {KERN_VERSION, "version", system_utsname.version, 64,
- 0444, NULL, &proc_doutsstring, &sysctl_string},
- {KERN_NODENAME, "hostname", system_utsname.nodename, 64,
- 0644, NULL, &proc_doutsstring, &sysctl_string},
- {KERN_DOMAINNAME, "domainname", system_utsname.domainname, 64,
- 0644, NULL, &proc_doutsstring, &sysctl_string},
- {KERN_PANIC, "panic", &panic_timeout, sizeof(int),
- 0644, NULL, &proc_dointvec},
- {KERN_CORE_USES_PID, "core_uses_pid", &core_uses_pid, sizeof(int),
- 0644, NULL, &proc_dointvec},
- {KERN_CORE_PATTERN, "core_pattern", core_pattern, 64,
- 0644, NULL, &proc_dostring, &sysctl_string},
- {KERN_TAINTED, "tainted", &tainted, sizeof(int),
- 0644, NULL, &proc_dointvec},
- {KERN_CAP_BSET, "cap-bound", &cap_bset, sizeof(kernel_cap_t),
- 0600, NULL, &proc_dointvec_bset},
+ {
+ .ctl_name = KERN_OSTYPE,
+ .procname = "ostype",
+ .data = system_utsname.sysname,
+ .maxlen = 64,
+ .mode = 0444,
+ .proc_handler = &proc_doutsstring,
+ .strategy = &sysctl_string,
+ },
+ {
+ .ctl_name = KERN_OSRELEASE,
+ .procname = "osrelease",
+ .data = system_utsname.release,
+ .maxlen = 64,
+ .mode = 0444,
+ .proc_handler = &proc_doutsstring,
+ .strategy = &sysctl_string,
+ },
+ {
+ .ctl_name = KERN_VERSION,
+ .procname = "version",
+ .data = system_utsname.version,
+ .maxlen = 64,
+ .mode = 0444,
+ .proc_handler = &proc_doutsstring,
+ .strategy = &sysctl_string,
+ },
+ {
+ .ctl_name = KERN_NODENAME,
+ .procname = "hostname",
+ .data = system_utsname.nodename,
+ .maxlen = 64,
+ .mode = 0644,
+ .proc_handler = &proc_doutsstring,
+ .strategy = &sysctl_string,
+ },
+ {
+ .ctl_name = KERN_DOMAINNAME,
+ .procname = "domainname",
+ .data = system_utsname.domainname,
+ .maxlen = 64,
+ .mode = 0644,
+ .proc_handler = &proc_doutsstring,
+ .strategy = &sysctl_string,
+ },
+ {
+ .ctl_name = KERN_PANIC,
+ .procname = "panic",
+ .data = &panic_timeout,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_CORE_USES_PID,
+ .procname = "core_uses_pid",
+ .data = &core_uses_pid,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_CORE_PATTERN,
+ .procname = "core_pattern",
+ .data = core_pattern,
+ .maxlen = 64,
+ .mode = 0644,
+ .proc_handler = &proc_dostring,
+ .strategy = &sysctl_string,
+ },
+ {
+ .ctl_name = KERN_TAINTED,
+ .procname = "tainted",
+ .data = &tainted,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_CAP_BSET,
+ .procname = "cap-bound",
+ .data = &cap_bset,
+ .maxlen = sizeof(kernel_cap_t),
+ .mode = 0600,
+ .proc_handler = &proc_dointvec_bset,
+ },
#ifdef CONFIG_BLK_DEV_INITRD
- {KERN_REALROOTDEV, "real-root-dev", &real_root_dev, sizeof(int),
- 0644, NULL, &proc_dointvec},
+ {
+ .ctl_name = KERN_REALROOTDEV,
+ .procname = "real-root-dev",
+ .data = &real_root_dev,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#endif
#ifdef __sparc__
- {KERN_SPARC_REBOOT, "reboot-cmd", reboot_command,
- 256, 0644, NULL, &proc_dostring, &sysctl_string },
- {KERN_SPARC_STOP_A, "stop-a", &stop_a_enabled, sizeof (int),
- 0644, NULL, &proc_dointvec},
+ {
+ .ctl_name = KERN_SPARC_REBOOT,
+ .procname = "reboot-cmd",
+ .data = reboot_command,
+ .maxlen = 256,
+ .mode = 0644,
+ .proc_handler = &proc_dostring,
+ .strategy = &sysctl_string,
+ },
+ {
+ .ctl_name = KERN_SPARC_STOP_A,
+ .procname = "stop-a",
+ .data = &stop_a_enabled,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#endif
#if defined(CONFIG_PPC32) && defined(CONFIG_6xx)
- {KERN_PPC_POWERSAVE_NAP, "powersave-nap", &powersave_nap, sizeof(int),
- 0644, NULL, &proc_dointvec},
- {KERN_PPC_L2CR, "l2cr", NULL, 0,
- 0644, NULL, &proc_dol2crvec},
+ {
+ .ctl_name = KERN_PPC_POWERSAVE_NAP,
+ .procname = "powersave-nap",
+ .data = &powersave_nap,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_PPC_L2CR,
+ .procname = "l2cr",
+ .mode = 0644,
+ .proc_handler = &proc_dol2crvec,
+ },
#endif
- {KERN_CTLALTDEL, "ctrl-alt-del", &C_A_D, sizeof(int),
- 0644, NULL, &proc_dointvec},
- {KERN_PRINTK, "printk", &console_loglevel, 4*sizeof(int),
- 0644, NULL, &proc_dointvec},
+ {
+ .ctl_name = KERN_CTLALTDEL,
+ .procname = "ctrl-alt-del",
+ .data = &C_A_D,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_PRINTK,
+ .procname = "printk",
+ .data = &console_loglevel,
+ .maxlen = 4*sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#ifdef CONFIG_KMOD
- {KERN_MODPROBE, "modprobe", &modprobe_path, 256,
- 0644, NULL, &proc_dostring, &sysctl_string },
+ {
+ .ctl_name = KERN_MODPROBE,
+ .procname = "modprobe",
+ .data = &modprobe_path,
+ .maxlen = 256,
+ .mode = 0644,
+ .proc_handler = &proc_dostring,
+ .strategy = &sysctl_string,
+ },
#endif
#ifdef CONFIG_HOTPLUG
- {KERN_HOTPLUG, "hotplug", &hotplug_path, 256,
- 0644, NULL, &proc_dostring, &sysctl_string },
+ {
+ .ctl_name = KERN_HOTPLUG,
+ .procname = "hotplug",
+ .data = &hotplug_path,
+ .maxlen = 256,
+ .mode = 0644,
+ .proc_handler = &proc_dostring,
+ .strategy = &sysctl_string,
+ },
#endif
#ifdef CONFIG_CHR_DEV_SG
- {KERN_SG_BIG_BUFF, "sg-big-buff", &sg_big_buff, sizeof (int),
- 0444, NULL, &proc_dointvec},
+ {
+ .ctl_name = KERN_SG_BIG_BUFF,
+ .procname = "sg-big-buff",
+ .data = &sg_big_buff,
+ .maxlen = sizeof (int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
#endif
#ifdef CONFIG_BSD_PROCESS_ACCT
- {KERN_ACCT, "acct", &acct_parm, 3*sizeof(int),
- 0644, NULL, &proc_dointvec},
+ {
+ .ctl_name = KERN_ACCT,
+ .procname = "acct",
+ .data = &acct_parm,
+ .maxlen = 3*sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#endif
- {KERN_RTSIGNR, "rtsig-nr", &nr_queued_signals, sizeof(int),
- 0444, NULL, &proc_dointvec},
- {KERN_RTSIGMAX, "rtsig-max", &max_queued_signals, sizeof(int),
- 0644, NULL, &proc_dointvec},
+ {
+ .ctl_name = KERN_RTSIGNR,
+ .procname = "rtsig-nr",
+ .data = &nr_queued_signals,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_RTSIGMAX,
+ .procname = "rtsig-max",
+ .data = &max_queued_signals,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#ifdef CONFIG_SYSVIPC
- {KERN_SHMMAX, "shmmax", &shm_ctlmax, sizeof (size_t),
- 0644, NULL, &proc_doulongvec_minmax},
- {KERN_SHMALL, "shmall", &shm_ctlall, sizeof (size_t),
- 0644, NULL, &proc_doulongvec_minmax},
- {KERN_SHMMNI, "shmmni", &shm_ctlmni, sizeof (int),
- 0644, NULL, &proc_dointvec},
- {KERN_MSGMAX, "msgmax", &msg_ctlmax, sizeof (int),
- 0644, NULL, &proc_dointvec},
- {KERN_MSGMNI, "msgmni", &msg_ctlmni, sizeof (int),
- 0644, NULL, &proc_dointvec},
- {KERN_MSGMNB, "msgmnb", &msg_ctlmnb, sizeof (int),
- 0644, NULL, &proc_dointvec},
- {KERN_SEM, "sem", &sem_ctls, 4*sizeof (int),
- 0644, NULL, &proc_dointvec},
+ {
+ .ctl_name = KERN_SHMMAX,
+ .procname = "shmmax",
+ .data = &shm_ctlmax,
+ .maxlen = sizeof (size_t),
+ .mode = 0644,
+ .proc_handler = &proc_doulongvec_minmax,
+ },
+ {
+ .ctl_name = KERN_SHMALL,
+ .procname = "shmall",
+ .data = &shm_ctlall,
+ .maxlen = sizeof (size_t),
+ .mode = 0644,
+ .proc_handler = &proc_doulongvec_minmax,
+ },
+ {
+ .ctl_name = KERN_SHMMNI,
+ .procname = "shmmni",
+ .data = &shm_ctlmni,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_MSGMAX,
+ .procname = "msgmax",
+ .data = &msg_ctlmax,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_MSGMNI,
+ .procname = "msgmni",
+ .data = &msg_ctlmni,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_MSGMNB,
+ .procname = "msgmnb",
+ .data = &msg_ctlmnb,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_SEM,
+ .procname = "sem",
+ .data = &sem_ctls,
+ .maxlen = 4*sizeof (int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#endif
#ifdef CONFIG_MAGIC_SYSRQ
- {KERN_SYSRQ, "sysrq", &sysrq_enabled, sizeof (int),
- 0644, NULL, &proc_dointvec},
-#endif
- {KERN_CADPID, "cad_pid", &cad_pid, sizeof (int),
- 0600, NULL, &proc_dointvec},
- {KERN_MAX_THREADS, "threads-max", &max_threads, sizeof(int),
- 0644, NULL, &proc_dointvec},
- {KERN_RANDOM, "random", NULL, 0, 0555, random_table},
- {KERN_OVERFLOWUID, "overflowuid", &overflowuid, sizeof(int), 0644, NULL,
- &proc_dointvec_minmax, &sysctl_intvec, NULL,
- &minolduid, &maxolduid},
- {KERN_OVERFLOWGID, "overflowgid", &overflowgid, sizeof(int), 0644, NULL,
- &proc_dointvec_minmax, &sysctl_intvec, NULL,
- &minolduid, &maxolduid},
+ {
+ .ctl_name = KERN_SYSRQ,
+ .procname = "sysrq",
+ .data = &sysrq_enabled,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+#endif
+ {
+ .ctl_name = KERN_CADPID,
+ .procname = "cad_pid",
+ .data = &cad_pid,
+ .maxlen = sizeof (int),
+ .mode = 0600,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_MAX_THREADS,
+ .procname = "threads-max",
+ .data = &max_threads,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_RANDOM,
+ .procname = "random",
+ .mode = 0555,
+ .child = random_table,
+ },
+ {
+ .ctl_name = KERN_OVERFLOWUID,
+ .procname = "overflowuid",
+ .data = &overflowuid,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &minolduid,
+ .extra2 = &maxolduid,
+ },
+ {
+ .ctl_name = KERN_OVERFLOWGID,
+ .procname = "overflowgid",
+ .data = &overflowgid,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &minolduid,
+ .extra2 = &maxolduid,
+ },
#ifdef CONFIG_ARCH_S390
#ifdef CONFIG_MATHEMU
- {KERN_IEEE_EMULATION_WARNINGS,"ieee_emulation_warnings",
- &sysctl_ieee_emulation_warnings,sizeof(int),0644,NULL,&proc_dointvec},
+ {
+ .ctl_name = KERN_IEEE_EMULATION_WARNINGS,
+ .procname = "ieee_emulation_warnings",
+ .data = &sysctl_ieee_emulation_warnings,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#endif
- {KERN_S390_USER_DEBUG_LOGGING,"userprocess_debug",
- &sysctl_userprocess_debug,sizeof(int),0644,NULL,&proc_dointvec},
+ {
+ .ctl_name = KERN_S390_USER_DEBUG_LOGGING,
+ .procname = "userprocess_debug",
+ .data = &sysctl_userprocess_debug,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#endif
- {KERN_PIDMAX, "pid_max", &pid_max, sizeof (int),
- 0600, NULL, &proc_dointvec},
- {KERN_PANIC_ON_OOPS,"panic_on_oops",
- &panic_on_oops,sizeof(int),0644,NULL,&proc_dointvec},
- {0}
+ {
+ .ctl_name = KERN_PIDMAX,
+ .procname = "pid_max",
+ .data = &pid_max,
+ .maxlen = sizeof (int),
+ .mode = 0600,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = KERN_PANIC_ON_OOPS,
+ .procname = "panic_on_oops",
+ .data = &panic_on_oops,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ { .ctl_name = 0 }
};
/* Constants for minimum and maximum testing in vm_table.
@@ -275,79 +560,210 @@ static int one_hundred = 100;
static ctl_table vm_table[] = {
- {VM_OVERCOMMIT_MEMORY, "overcommit_memory", &sysctl_overcommit_memory,
- sizeof(sysctl_overcommit_memory), 0644, NULL, &proc_dointvec},
- {VM_OVERCOMMIT_RATIO, "overcommit_ratio",
- &sysctl_overcommit_ratio, sizeof(sysctl_overcommit_ratio), 0644,
- NULL, &proc_dointvec},
- {VM_PAGE_CLUSTER, "page-cluster",
- &page_cluster, sizeof(int), 0644, NULL, &proc_dointvec},
- {VM_DIRTY_BACKGROUND, "dirty_background_ratio",
- &dirty_background_ratio, sizeof(dirty_background_ratio),
- 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, NULL,
- &zero, &one_hundred },
- {VM_DIRTY_RATIO, "dirty_ratio", &vm_dirty_ratio,
- sizeof(vm_dirty_ratio), 0644, NULL, &proc_dointvec_minmax,
- &sysctl_intvec, NULL, &zero, &one_hundred },
- {VM_DIRTY_WB_CS, "dirty_writeback_centisecs",
- &dirty_writeback_centisecs, sizeof(dirty_writeback_centisecs), 0644,
- NULL, dirty_writeback_centisecs_handler },
- {VM_DIRTY_EXPIRE_CS, "dirty_expire_centisecs",
- &dirty_expire_centisecs, sizeof(dirty_expire_centisecs), 0644,
- NULL, &proc_dointvec},
- { VM_NR_PDFLUSH_THREADS, "nr_pdflush_threads",
- &nr_pdflush_threads, sizeof nr_pdflush_threads,
- 0444 /* read-only*/, NULL, &proc_dointvec},
- {VM_SWAPPINESS, "swappiness", &vm_swappiness, sizeof(vm_swappiness),
- 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, NULL, &zero,
- &one_hundred },
+ {
+ .ctl_name = VM_OVERCOMMIT_MEMORY,
+ .procname = "overcommit_memory",
+ .data = &sysctl_overcommit_memory,
+ .maxlen = sizeof(sysctl_overcommit_memory),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = VM_OVERCOMMIT_RATIO,
+ .procname = "overcommit_ratio",
+ .data = &sysctl_overcommit_ratio,
+ .maxlen = sizeof(sysctl_overcommit_ratio),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = VM_PAGE_CLUSTER,
+ .procname = "page-cluster",
+ .data = &page_cluster,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = VM_DIRTY_BACKGROUND,
+ .procname = "dirty_background_ratio",
+ .data = &dirty_background_ratio,
+ .maxlen = sizeof(dirty_background_ratio),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
+ .extra2 = &one_hundred,
+ },
+ {
+ .ctl_name = VM_DIRTY_RATIO,
+ .procname = "dirty_ratio",
+ .data = &vm_dirty_ratio,
+ .maxlen = sizeof(vm_dirty_ratio),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
+ .extra2 = &one_hundred,
+ },
+ {
+ .ctl_name = VM_DIRTY_WB_CS,
+ .procname = "dirty_writeback_centisecs",
+ .data = &dirty_writeback_centisecs,
+ .maxlen = sizeof(dirty_writeback_centisecs),
+ .mode = 0644,
+ .proc_handler = dirty_writeback_centisecs_handler,
+ },
+ {
+ .ctl_name = VM_DIRTY_EXPIRE_CS,
+ .procname = "dirty_expire_centisecs",
+ .data = &dirty_expire_centisecs,
+ .maxlen = sizeof(dirty_expire_centisecs),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = VM_NR_PDFLUSH_THREADS,
+ .procname = "nr_pdflush_threads",
+ .data = &nr_pdflush_threads,
+ .maxlen = sizeof nr_pdflush_threads,
+ .mode = 0444 /* read-only*/,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = VM_SWAPPINESS,
+ .procname = "swappiness",
+ .data = &vm_swappiness,
+ .maxlen = sizeof(vm_swappiness),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
+ .extra2 = &one_hundred,
+ },
#ifdef CONFIG_HUGETLB_PAGE
- {VM_HUGETLB_PAGES, "nr_hugepages", &htlbpage_max, sizeof(int), 0644,
- NULL, &hugetlb_sysctl_handler},
+ {
+ .ctl_name = VM_HUGETLB_PAGES,
+ .procname = "nr_hugepages",
+ .data = &htlbpage_max,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &hugetlb_sysctl_handler,
+ },
#endif
- {VM_LOWER_ZONE_PROTECTION, "lower_zone_protection",
- &sysctl_lower_zone_protection, sizeof(sysctl_lower_zone_protection),
- 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, NULL, &zero,
- NULL, },
- {0}
+ {
+ .ctl_name = VM_LOWER_ZONE_PROTECTION,
+ .procname = "lower_zone_protection",
+ .data = &sysctl_lower_zone_protection,
+ .maxlen = sizeof(sysctl_lower_zone_protection),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
+ },
+ { .ctl_name = 0 }
};
static ctl_table proc_table[] = {
- {0}
+ { .ctl_name = 0 }
};
static ctl_table fs_table[] = {
- {FS_NRINODE, "inode-nr", &inodes_stat, 2*sizeof(int),
- 0444, NULL, &proc_dointvec},
- {FS_STATINODE, "inode-state", &inodes_stat, 7*sizeof(int),
- 0444, NULL, &proc_dointvec},
- {FS_NRFILE, "file-nr", &files_stat, 3*sizeof(int),
- 0444, NULL, &proc_dointvec},
- {FS_MAXFILE, "file-max", &files_stat.max_files, sizeof(int),
- 0644, NULL, &proc_dointvec},
- {FS_DENTRY, "dentry-state", &dentry_stat, 6*sizeof(int),
- 0444, NULL, &proc_dointvec},
- {FS_OVERFLOWUID, "overflowuid", &fs_overflowuid, sizeof(int), 0644, NULL,
- &proc_dointvec_minmax, &sysctl_intvec, NULL,
- &minolduid, &maxolduid},
- {FS_OVERFLOWGID, "overflowgid", &fs_overflowgid, sizeof(int), 0644, NULL,
- &proc_dointvec_minmax, &sysctl_intvec, NULL,
- &minolduid, &maxolduid},
- {FS_LEASES, "leases-enable", &leases_enable, sizeof(int),
- 0644, NULL, &proc_dointvec},
- {FS_DIR_NOTIFY, "dir-notify-enable", &dir_notify_enable,
- sizeof(int), 0644, NULL, &proc_dointvec},
- {FS_LEASE_TIME, "lease-break-time", &lease_break_time, sizeof(int),
- 0644, NULL, &proc_dointvec},
- {0}
+ {
+ .ctl_name = FS_NRINODE,
+ .procname = "inode-nr",
+ .data = &inodes_stat,
+ .maxlen = 2*sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_STATINODE,
+ .procname = "inode-state",
+ .data = &inodes_stat,
+ .maxlen = 7*sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_NRFILE,
+ .procname = "file-nr",
+ .data = &files_stat,
+ .maxlen = 3*sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_MAXFILE,
+ .procname = "file-max",
+ .data = &files_stat.max_files,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_DENTRY,
+ .procname = "dentry-state",
+ .data = &dentry_stat,
+ .maxlen = 6*sizeof(int),
+ .mode = 0444,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_OVERFLOWUID,
+ .procname = "overflowuid",
+ .data = &fs_overflowuid,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &minolduid,
+ .extra2 = &maxolduid,
+ },
+ {
+ .ctl_name = FS_OVERFLOWGID,
+ .procname = "overflowgid",
+ .data = &fs_overflowgid,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &minolduid,
+ .extra2 = &maxolduid,
+ },
+ {
+ .ctl_name = FS_LEASES,
+ .procname = "leases-enable",
+ .data = &leases_enable,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_DIR_NOTIFY,
+ .procname = "dir-notify-enable",
+ .data = &dir_notify_enable,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = FS_LEASE_TIME,
+ .procname = "lease-break-time",
+ .data = &lease_break_time,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ { .ctl_name = 0 }
};
static ctl_table debug_table[] = {
- {0}
+ { .ctl_name = 0 }
};
static ctl_table dev_table[] = {
- {0}
+ { .ctl_name = 0 }
};
extern void init_irq_proc (void);