[lkml]   [2003]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: fun or real: proc interface for module handling?
Hi !
On Thursday 31 July 2003 16:12, Nico Schottelius wrote:
> Hello!
> I was just joking around here, but what do you think about this idea:
> A proc interface for module handling:
> /proc/mods/
> /proc/mods/<module-name>/<link-to-the-modules-use-us>
> So we could try to load a module with
> mkdir /proc/mods/ipv6
> and remove it and every module which uses us with
> rm -r /proc/mods/ipv6

Well, this idea itsel is quite neat, and could sometimes save lots of time
(esp. when dealing with serious modules' deps). I would like to propose
slightly different appropach:
cp /lib/modules/2.6.0-test2/kernel/drivers/somedriver.ko /proc/modtree
is equivalent to insmod somedriver.ko (or modprobe ?). (How one could pass
module params in the former case ?).
Then, if no other module depends on it, then this entry (under /proc/modtree)
is a file, otherwise its a directory, with all depending modules also either
files or dirs. So, module removal would be as simple as
[ -f /proc/modtree/somedriver ] && rm /proc/modtree/somedriver || \
[ -d /proc/modtree/somedriver ] && rm -rf /proc/modtree/somedriver/* ; \
rm /proc/modtree/somedriver

With all the best, yarick at relex dot ru.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.084 / U:4.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site