mdev : bug corrected (patch attached)
Bernhard Fischer
rep.dot.nop at gmail.com
Fri Jun 1 21:43:48 UTC 2007
On Fri, Jun 01, 2007 at 08:36:19PM +0200, Souf wrote:
>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:
You didn't paste the output of size(1) AFAICS.
Doubling the size of mdev is not exactly a thing that strikes me as a
good idea, conceptually.
>
>(mdev.conf)
>1- create symlinks
> <symlink> -> <target>
> stderr -> /proc/self/fd/2
> XOR -> null
Doesn't sound like it would warrant more than let's say 200 bytes.
>
>2- create (sub-)directories
> <[path/]directory> <octal permissions>
> pts 755
> shm 777
> bus/usb/001 0755
Doesn't sound like it would warrant more than let's say another 200 bytes.
>
>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
Doesn't sound like it would warrant more than let's say another 100 bytes.
>
>4- execute an command (exactly like the 1st mdev)
If it's exactly like the current mdev, no size-increase warranted.
> <[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)
That could cost a little bit, i admit, but not too much either.
What's the bloat-o-meter output against pristine trunk and the size(1)
output of it?
More information about the busybox
mailing list