* [PATCH 1/3] NET: Use proc_net_fops_create() and proc_net_remove() in net/core
@ 2003-09-07 18:41 YOSHIFUJI Hideaki / 吉藤英明
2003-09-12 0:59 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2003-09-07 18:41 UTC (permalink / raw)
To: davem; +Cc: netdev
[1/3] Use proc_net_fops_create() and proc_net_remove() in net/core.
Index: linux-2.6/net/core/dev.c
===================================================================
RCS file: /home/cvs/linux-2.5/net/core/dev.c,v
retrieving revision 1.85
diff -u -r1.85 dev.c
--- linux-2.6/net/core/dev.c 2 Sep 2003 01:25:27 -0000 1.85
+++ linux-2.6/net/core/dev.c 7 Sep 2003 17:02:52 -0000
@@ -1994,26 +1994,21 @@
static int __init dev_proc_init(void)
{
- struct proc_dir_entry *p;
int rc = -ENOMEM;
- p = create_proc_entry("dev", S_IRUGO, proc_net);
- if (!p)
+ if (!proc_net_fops_create("dev", S_IRUGO, &dev_seq_fops))
goto out;
- p->proc_fops = &dev_seq_fops;
- p = create_proc_entry("softnet_stat", S_IRUGO, proc_net);
- if (!p)
+ if (!proc_net_fops_create("softnet_stat", S_IRUGO, &softnet_seq_fops))
goto out_dev;
- p->proc_fops = &softnet_seq_fops;
if (wireless_proc_init())
goto out_softnet;
rc = 0;
out:
return rc;
out_softnet:
- remove_proc_entry("softnet_stat", proc_net);
+ proc_net_remove("softnet_stat");
out_dev:
- remove_proc_entry("dev", proc_net);
+ proc_net_remove("dev");
goto out;
}
#else
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] NET: Use proc_net_fops_create() and proc_net_remove() in net/core
2003-09-07 18:41 [PATCH 1/3] NET: Use proc_net_fops_create() and proc_net_remove() in net/core YOSHIFUJI Hideaki / 吉藤英明
@ 2003-09-12 0:59 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-09-12 0:59 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / _$B5HF#1QL@; +Cc: netdev
On Mon, 08 Sep 2003 03:41:02 +0900 (JST)
YOSHIFUJI Hideaki / _$B5HF#1QL@ <yoshfuji@linux-ipv6.org> wrote:
> [1/3] Use proc_net_fops_create() and proc_net_remove() in net/core.
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-09-12 0:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-07 18:41 [PATCH 1/3] NET: Use proc_net_fops_create() and proc_net_remove() in net/core YOSHIFUJI Hideaki / 吉藤英明
2003-09-12 0:59 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).