linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* proc_mkdir -> where is proc_rmdir ?
@ 2001-09-09 17:41 Lukas Ruf
  2001-09-09 19:31 ` Randy.Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Ruf @ 2001-09-09 17:41 UTC (permalink / raw)
  To: Linux Kernel ml

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.

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!

Lukas

-- 
Lukas Ruf                        Swiss Federal Institute of Technology
Office: ETZ-G61.2                             Computer Engineering and
Phone: +41/1/632 7312                        Networks Laboratory (TIK)
Fax:   +41/1/632 1035                                      ETH Zentrum
PGP 2.6: ID D20BA2ED;                                    Gloriastr. 35
Fingerprint 6323 B9BC 9C8E 6563  B477 BADD FEA6 E6B7    CH-8092 Zurich

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: proc_mkdir -> where is proc_rmdir ?
  2001-09-09 17:41 proc_mkdir -> where is proc_rmdir ? Lukas Ruf
@ 2001-09-09 19:31 ` Randy.Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy.Dunlap @ 2001-09-09 19:31 UTC (permalink / raw)
  To: Lukas Ruf; +Cc: Linux Kernel ml

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-09 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-09 17:41 proc_mkdir -> where is proc_rmdir ? Lukas Ruf
2001-09-09 19:31 ` Randy.Dunlap

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).