[MDEV] mdev and CONFIG_SYSFS_DEPRECATED

Souf souf_oued at yahoo.fr
Wed May 9 14:46:02 PDT 2007


Hi all,
I rewrote mdev so that it can work with or without CONFIG_SYSFS_DEPRECATED in the kernel,
this rewriting implies a minor modification of the syntax of mdev.config
New the mdev can:
1- create symlinks
        <symlink> -> <target>
        stderr -> /proc/self/fd/2
        XOR -> null

2- create (sub-)directories
        <(sub-)directory> <octal permissions>
        bus/usb/001 0755
        disk/by-id 0755

3- create a device in a (sub-)directory
        <device regex> <uid>:<gid> <octal permissions> [</>>/>
<(sub-)directory> <octal permissions>]
        seq 0:0 0666 >> snd 0755
        pcmC[0-9]D[0-9]p 0:0 0666 >> snd 0755
        event[0-9] 0:0 0600 >> input 0755

4- execute an command
        <device regex> <uid>:<gid> <octal permissions> [</>>/>
<(sub-)directory> <octal permissions>] [<@|$|*> <command>]
        controlC[0-9] 0:0 0666 >> snd 0755  @ echo "hello $MDEV"
        seq     0:0 0666 $echo "good bye $MDEV"
        timer 0:0 0666 >> snd 0755 * echo "Hi $MDEV"    

        @ Run after creating the device.
        $ Run before removing the device.
        * Run both after creating and before removing the device.

5- work with or without CONFIG_SYSFS_DEPRECATED

I awaits your reactions and your ideas

Regards

Malek

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdev.c
Type: text/x-csrc
Size: 7779 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20070509/a831d89f/attachment.c 


More information about the busybox mailing list