/proc/[number] special entries

From: Matthew Hindle (luminary_at_penguinmail.com)
Date: 10/10/04

  • Next message: greg: "hello"
    To: linux-kernel@vger.kernel.org
    Date:	Sun, 10 Oct 2004 15:31:24 +1000
    
    

    I was wondering if anybody could help me with a hint or two...

    I'm trying to add a sub-directory to each /proc/[number] directory
    (where [number] is a process id). I think that I need to get a
    proc_dir_entry* so that I can call:

    proc_mkdir("mysubdir", (struct proc_dir_entry *) parent);

    However, I can't work out how to get a reference to the proc_dir_entry*
    I need. I can find the other entries in the proc directory (such as bus,
    cpuinfo. misc, net...) by doing something like this:

    struct proc_dir_entry * dp;
    dp = &proc_root;
    dp = dp->subdir;
    while (dp != NULL) {
      printk("er... found: %s\n",dp->name);
      dp = dp->next;
    }

    However, the only entries that don't show up are the [number] entries.
    Assistance please!

    Please CC: any replies to <luminary@penguinmail.com>.

    Kind regards,
    Matt Hindle.

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


  • Next message: greg: "hello"

    Relevant Pages

    • Re: /proc/[number] special entries
      ... > I was wondering if anybody could help me with a hint or two... ... I can find the other entries in the proc directory (such as bus, ... > Matt Hindle. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] CKRM: 4/10 CKRM: Full rcfs support
      ... I believe that these are auto-created file entries which are instantiated ... > Shouldn't this really be INFO level? ... > if CKRM is enabled? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [BUG?] Recent feral ISP interaction with alpha dma
      ... * to get bus addresses of each of the SG entries and their lengths. ... > I have an Alphaserver 4100 where I have been testing a build of kernel ... > After poking around in the source, I am suspecting my problem in the feral ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] CKRM: 4/10 CKRM: Full rcfs support
      ... > distinguish these auto-created entries from other entries in a directory. ... Use a #define, not a inline function for this, like everyone else in the ... >> if CKRM is enabled? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] x86_64 io_apic.c: Memorize at bootup where the i8259 is connected
      ... Actually in LinuxBIOS I swap the irq 0 and 2 entries in mptable to ... > should be able to use kexec now. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)