[PATCH] modutils: Add /proc/cmdline module option parsing support
Ozan Çağlayan
ozan at pardus.org.tr
Sun Jan 24 11:11:35 UTC 2010
Stefan Seyfried wrote:
> On Sat, 23 Jan 2010 01:50:20 +0200
> Ozan Çağlayan <ozan at pardus.org.tr> wrote:
>
>> This adds module option parsing support from /proc/cmdline like in
>> module-init-tools.
>>
>> The options passed through /proc/cmdline are always squeezed by the ones
>> provided with command line arguments.
>
> Can you tell us something about the code size increase? Rule of thumb:
> if it's more than 10 bytes and an obscure feature (from an embedded
> POV), then it should be wrapped in CONFIG_FEATURE_.... ;-)
function old new delta
parse_kcmdline_module_options - 218 +218
do_modprobe 356 376 +20
.rodata 126228 126243 +15
gather_options_str 75 79 +4
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 257/0) Total: 257 bytes
text data bss dec hex filename
674967 2057 9040 686064 a77f0 busybox_old
675224 2057 9040 686321 a78f1 busybox_unstripped
So it's far from +10 :)
BTW, the +4 in gather_options_str is a general fix which avoids possible NULL pointer dereferences
so it's +253 :)
If you think that it's not necessary at all to provide this functionality, I'll keep this patch local to my busybox
or else I'll spin another patch with FEATURE_ stuff.
Thanks!
More information about the busybox
mailing list