lkml.org 
[lkml]   [2003]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: fun or real: proc interface for module handling?
    Date
    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 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/

    \
     
     \ /
      Last update: 2005-03-22 13:47    [W:0.032 / U:0.200 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site