aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_sysctl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/scsi/scsi_sysctl.c
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/scsi/scsi_sysctl.c')
-rw-r--r--drivers/scsi/scsi_sysctl.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_sysctl.c b/drivers/scsi/scsi_sysctl.c
new file mode 100644
index 000000000000..04d06c25132b
--- /dev/null
+++ b/drivers/scsi/scsi_sysctl.c
@@ -0,0 +1,53 @@
1/*
2 * Copyright (C) 2003 Christoph Hellwig.
3 * Released under GPL v2.
4 */
5
6#include <linux/errno.h>
7#include <linux/init.h>
8#include <linux/kernel.h>
9#include <linux/sysctl.h>
10
11#include "scsi_logging.h"
12
13
14static ctl_table scsi_table[] = {
15 { .ctl_name = DEV_SCSI_LOGGING_LEVEL,
16 .procname = "logging_level",
17 .data = &scsi_logging_level,
18 .maxlen = sizeof(scsi_logging_level),
19 .mode = 0644,
20 .proc_handler = &proc_dointvec },
21 { }
22};
23
24static ctl_table scsi_dir_table[] = {
25 { .ctl_name = DEV_SCSI,
26 .procname = "scsi",
27 .mode = 0555,
28 .child = scsi_table },
29 { }
30};
31
32static ctl_table scsi_root_table[] = {
33 { .ctl_name = CTL_DEV,
34 .procname = "dev",
35 .mode = 0555,
36 .child = scsi_dir_table },
37 { }
38};
39
40static struct ctl_table_header *scsi_table_header;
41
42int __init scsi_init_sysctl(void)
43{
44 scsi_table_header = register_sysctl_table(scsi_root_table, 1);
45 if (!scsi_table_header)
46 return -ENOMEM;
47 return 0;
48}
49
50void scsi_exit_sysctl(void)
51{
52 unregister_sysctl_table(scsi_table_header);
53}