linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Berkley Shands <berkley@cs.wustl.edu>
To: linux-kernel@vger.kernel.org
Subject: /proc/net/atm/<device> handling wrong 2.4.0-test9+
Date: Tue, 28 Nov 2000 10:50:53 -0600 (CST)	[thread overview]
Message-ID: <200011281650.KAA0000004329@mudpuddle.cs.wustl.edu> (raw)

This has been reported in the linux-atm mailing list as well..
/usr/src/linux/net/atm/proc.c has a problem.
in 2.4.0-test9 and later, the routine atm_proc_dev_register(); is called
before atm_proc_init();
the latter is called at the very end of startup, long after the pci
devices are
initialized. This results in the /proc devices being in /proc/eni:1 or
/proc/wuapic:1
not in /proc/net/atm/eni:1 or /proc/net/atm/wuapic:1

here is a quicky patch to correct this.

diff -Naur linux-2.4.0-test11-clean/net/atm/proc.c linux/net/atm/proc.c
--- linux-2.4.0-test11-clean/net/atm/proc.c     Sat Jul  8 21:26:13 2000
+++ linux/net/atm/proc.c        Tue Nov 28 10:24:17 2000
@@ -547,6 +547,11 @@
        int digits,num;
        int error;

+/* atm_proc_init isn't called until the end of the startup */
+/* so make the call now instead */
+
+       if (! atm_proc_root)
+          atm_proc_init();             /* force /proc/net/atm to exist */
        error = -ENOMEM;
        digits = 0;
        for (num = dev->number; num; num /= 10) digits++;
@@ -589,9 +594,12 @@
        struct proc_dir_entry *devices = NULL,*pvc = NULL,*svc = NULL;
        struct proc_dir_entry *arp = NULL,*lec = NULL,*vc = NULL;

+       if (atm_proc_root)
+          return 0;            /* already made */
        atm_proc_root = proc_mkdir("net/atm",NULL);
        if (!atm_proc_root)
                return -ENOMEM;
+
        CREATE_ENTRY(devices);
        CREATE_ENTRY(pvc);
        CREATE_ENTRY(svc);

berkley
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

                 reply	other threads:[~2000-11-28 17:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200011281650.KAA0000004329@mudpuddle.cs.wustl.edu \
    --to=berkley@cs.wustl.edu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).