mdev : bug corrected (patch attached)

Souf souf_oued at yahoo.fr
Fri Jun 1 18:36:19 UTC 2007


Le vendredi 01 juin 2007 à 19:16 +0200, Bernhard Fischer a écrit :
> On Fri, Jun 01, 2007 at 07:08:16PM +0200, Souf wrote:
> >Le vendredi 01 juin 2007 à 15:57 +0200, Bernhard Fischer a écrit :
> 
> >> recursive_action() anyone?
> >
> >I had already sent a large patch to improve mdev but it does not seem to
> >interest many people, in any case I resend it here, it uses:
> >
> >xmalloc_getline()
> >last_char_is()
> >recursive_action()
> >bb_make_directory()
> >remove_file()
> >bb_get_last_path_component()
> >xmalloc_readlink_or_warn()
> >
> >all that for only 5.9 KB
> 
> 5.9 Kb as in adding 5.9 KB ?

total size of mdev after compilation = 5.9 KB
> 
> What are the size(1)es for this large patch?
> >

"large" patch = 10.7 KB
but it modifies the operation of mdev deeply:

(mdev.conf)
1- create symlinks
	<symlink> -> <target>
        stderr -> /proc/self/fd/2
        XOR -> null

2- create (sub-)directories
        <[path/]directory> <octal permissions>
	pts 755
	shm 777
        bus/usb/001 0755

3- create a device in a (sub-)directory
        <[path/]device regex> <uid:gid> <octal permissions>
        snd/seq 0:0 0666
        snd/pcm[CD0-9cp]* 0:0 0666
        input/event[0-9] 0:0 0600

4- execute an command (exactly like the 1st mdev)
	<[path/]device regex> <uid:gid> <octal permissions> [<@|$|*> <command>]

        snd/controlC[0-9] 0:0 0666 @ echo "hello $MDEV"
        snd/seq     0:0 0666 $echo "goodbye $MDEV"
        snd/timer 0:0 0666 * 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 AND without CONFIG_SYSFS_DEPRECATED (kernel >= 2.6.20)

> >RFC:
> >http://busybox.net/lists/busybox/2007-May/027367.html
> >http://busybox.net/lists/busybox/2007-May/027515.html

Best regards.

Malek.






More information about the busybox mailing list