[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    modutils update (modprobe and config)
From:       "Yann E. MORIN" <yann.morin.1998 () anciens ! enib ! fr>
Date:       2005-11-27 22:19:43
Message-ID: 200511272319.43303.yann.morin.1998 () anciens ! enib ! fr
[Download RAW message or body]

Hello all!

Here am I with my modutils update.

Comments are most welcome (like friends are! :-] ).

Abstract:
---------

Config.in:
 - configuration revisited so options common to different utilities are grouped
   below.

 - superfluous spaces in description removed as well (mconf does a rather good
   job at tabulating well crafted dependencies).

 - utilities are reordered.

modprobe.c:
 - module options are stored in a one-way list rather than in a string;

 - module options from the command line are no longer parsed, they are
   directly stored in the list (go directly to start, take your 2000 euros);

 - multiple options parsing moved to config file parsing (because only those
   options need parsing), plus the code in mod_process is cleaner;

 - module options from aliases are appended to the aliased module options
   (recursively, and if any); this the behavior of module-init-tools, and
   not modutils; [*]

 - module options from the command line are appended to options from the
   config file; that is mainstream module-init-tools behavior; [**]
   mainstream modutils behavior is dropped (and it is not clearly explained
   in the man page, anyway).

 - use if( ENABLE_FEATURE_ ) rather tthan #ifdef CONFIG_FEATURE_; the
   resulting code is cleaner;

 - a little bit of comments added in the code to quickly understand what is
   being done;

 - some debug statements that get activated with CONFIG_DEBUG;

usage.h
 - some usage update and corrections as well.

Hmm. I guess that's all.

I tested it against a rather simple configuration. I tried all cases I could
think about. That is:
 --8<-- begin modprobe.conf --8<--
 options modname opt1=val1 opt2=val2
 alias alname modname
 options alname opt1=val3
 alias alname2 alname
 options alname2 opt2=val4
 --8<-- end modprobe.conf --8<--

which gave the expected result. No comments are allowed, except when on a
line by themselves (not after 'options' or 'alias' keywords).

(I'm just thinking of 'off' and 'null'. I forgot that. Sh!t... Anyway, I did
not change that code. Hope it still works... :-/ )

Anyway, tell me what you think.

Oh, by the way, sizes:

For current SVN:
   text    data     bss     dec     hex filename
   4194      40      32    4266    10aa modprobe.o
   4516      40      32    4588    11ec modprobe-with-2.6.o
   4622      40      32    4694    1256 modprobe-with-multiple-options.o
   4944      40      32    5016    1398 modprobe-with-2.6-and-multiple-options.o

For my modified modprobe:
   text    data     bss     dec     hex filename
   4453      40      32    4525    11ad modprobe.o
   4624      40      32    4696    1258 modprobe-with-2.6.o
   4876      40      32    4948    1354 modprobe-with-multiple-options.o
   5055      40      32    5127    1407 modprobe-with-2.6-and-multiple-options.o

That is:
   +259 modprobe.o
   +108 modprobe-with-2.6.o
   +254 modprobe-with-multiple-options.o
   +111 modprobe-with-2.6-and-multiple-options.o

Regards,
Yann E. MORIN.

[*]  modutils' behavior was to replace options, unless the keyword 'options'
     was prefixed with 'add', which has been dropped in module-init-tools. So
     did I.

[**] Note that in previous modprobe, module options from the command line were
     dropped if CONFIG_FEATURE_2_6_MODULES was not defined. I consider this
     a bug.
     Note also that it was not dependent on the running kernel, but only on the
     configuration of modprobe.

YEM.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< °_° >==-- °---.----------------:  X  AGAINST      |  /e\  There is no  |
| web: ymorin.free.fr | SETI@home 3808 | / \ HTML MAIL    |  """  conspiracy.  |
°---------------------°----------------°------------------°--------------------°

["busybox-modutils-modprobe_updated_and_config_reordered.patch.bz2" (application/x-bzip2)]

_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic