[MDEV] mdev and CONFIG_SYSFS_DEPRECATED

Souf souf_oued at yahoo.fr
Thu May 10 20:18:27 UTC 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
The new 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 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://lists.busybox.net/pipermail/busybox-cvs/attachments/20070510/f0d7a464/attachment-0002.c 


More information about the busybox-cvs mailing list