Re: proc_mkdir -> where is proc_rmdir ?

Randy.Dunlap (rddunlap@osdlab.org)
Sun, 09 Sep 2001 12:31:52 -0700


Lukas Ruf wrote:
>
> Dear all,
>
> I created some directories below /proc while a module got installed.
> When I de-install the module, I would like to remove these directories as
> well?
>
> First, I remove the entries within the directory by remove_proc_entry().
> So, the directories are empty. But when I try to remove the self-created
> directories with a similar call to remove_proc_entry(), nothing happens.

Is the target proc directory in use, such as mounted?

> So, I simply ask: is there somewhere a proc_rmdir() ? If not, how do I
> need to call the remove_proc_entry() such that the directory gets removed?
>
> Thanks for any help!

remove_proc_entry() is what the usb subsystem uses to remove its
main usb-fs directory (/proc/bus/usb), and it works.

That's also what the proc-fs example at
http://kernelnewbies.org/documents/kdoc/procfs-guide/example.html
uses. See that document if you haven't already.

~Randy
-
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/