X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fipx%2Fipx_proc.c;h=5ed97ad0e2e33e438cf482324b9b06d806a6d5fb;hb=77e2f14f71d68d05945f1d30ca55b5194d6ab1ce;hp=b7463dfca63e154fb90fd674980d1b4adae81914;hpb=40b20c257a13c5a526ac540bc5e43d0fdf29792a;p=linux-2.6 diff --git a/net/ipx/ipx_proc.c b/net/ipx/ipx_proc.c index b7463dfca6..5ed97ad0e2 100644 --- a/net/ipx/ipx_proc.c +++ b/net/ipx/ipx_proc.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -286,21 +287,21 @@ out: return 0; } -static struct seq_operations ipx_seq_interface_ops = { +static const struct seq_operations ipx_seq_interface_ops = { .start = ipx_seq_interface_start, .next = ipx_seq_interface_next, .stop = ipx_seq_interface_stop, .show = ipx_seq_interface_show, }; -static struct seq_operations ipx_seq_route_ops = { +static const struct seq_operations ipx_seq_route_ops = { .start = ipx_seq_route_start, .next = ipx_seq_route_next, .stop = ipx_seq_route_stop, .show = ipx_seq_route_show, }; -static struct seq_operations ipx_seq_socket_ops = { +static const struct seq_operations ipx_seq_socket_ops = { .start = ipx_seq_socket_start, .next = ipx_seq_socket_next, .stop = ipx_seq_interface_stop, @@ -322,7 +323,7 @@ static int ipx_seq_socket_open(struct inode *inode, struct file *file) return seq_open(file, &ipx_seq_socket_ops); } -static struct file_operations ipx_seq_interface_fops = { +static const struct file_operations ipx_seq_interface_fops = { .owner = THIS_MODULE, .open = ipx_seq_interface_open, .read = seq_read, @@ -330,7 +331,7 @@ static struct file_operations ipx_seq_interface_fops = { .release = seq_release, }; -static struct file_operations ipx_seq_route_fops = { +static const struct file_operations ipx_seq_route_fops = { .owner = THIS_MODULE, .open = ipx_seq_route_open, .read = seq_read, @@ -338,7 +339,7 @@ static struct file_operations ipx_seq_route_fops = { .release = seq_release, }; -static struct file_operations ipx_seq_socket_fops = { +static const struct file_operations ipx_seq_socket_fops = { .owner = THIS_MODULE, .open = ipx_seq_socket_open, .read = seq_read, @@ -352,27 +353,24 @@ int __init ipx_proc_init(void) { struct proc_dir_entry *p; int rc = -ENOMEM; - - ipx_proc_dir = proc_mkdir("ipx", proc_net); + + ipx_proc_dir = proc_mkdir("ipx", init_net.proc_net); if (!ipx_proc_dir) goto out; - p = create_proc_entry("interface", S_IRUGO, ipx_proc_dir); + p = proc_create("interface", S_IRUGO, + ipx_proc_dir, &ipx_seq_interface_fops); if (!p) goto out_interface; - p->proc_fops = &ipx_seq_interface_fops; - p = create_proc_entry("route", S_IRUGO, ipx_proc_dir); + p = proc_create("route", S_IRUGO, ipx_proc_dir, &ipx_seq_route_fops); if (!p) goto out_route; - p->proc_fops = &ipx_seq_route_fops; - p = create_proc_entry("socket", S_IRUGO, ipx_proc_dir); + p = proc_create("socket", S_IRUGO, ipx_proc_dir, &ipx_seq_socket_fops); if (!p) goto out_socket; - p->proc_fops = &ipx_seq_socket_fops; - rc = 0; out: return rc; @@ -381,7 +379,7 @@ out_socket: out_route: remove_proc_entry("interface", ipx_proc_dir); out_interface: - remove_proc_entry("ipx", proc_net); + remove_proc_entry("ipx", init_net.proc_net); goto out; } @@ -390,7 +388,7 @@ void __exit ipx_proc_exit(void) remove_proc_entry("interface", ipx_proc_dir); remove_proc_entry("route", ipx_proc_dir); remove_proc_entry("socket", ipx_proc_dir); - remove_proc_entry("ipx", proc_net); + remove_proc_entry("ipx", init_net.proc_net); } #else /* CONFIG_PROC_FS */