[Toybox] Differences between modinfo in toybox and standard version

idunham at lavabit.com idunham at lavabit.com
Thu Apr 25 17:15:37 PDT 2013


On Wed, Apr 24, 2013 at 03:04:53AM -0500, Rob Landley wrote:
> On 04/23/2013 12:25:47 AM, idunham at lavabit.com wrote:
> >On Mon, Apr 22, 2013 at 07:36:18PM -0500, Rob Landley wrote:
> >> On 04/22/2013 05:40:28 PM, Isaac Dunham wrote:
> >> >The kernel maps all occurences of '-' in module names to '_', so
> >> >that if you load a module such as snd-pcm-oss.ko or phc-k8.ko, it
> >> >is presented by lsmod and /proc/modules as module snd_pcm_oss or
> >> >phc_k8.
> >> >Modinfo from module-init-tools makes up for that by reversing the
> >> >logic and treating '-' and '_' as equivalent, while toybox takes
> >> >only the string passed.
> 
> Oh well, leave it for now, I guess. Not a critical command, works
> for the person who submitted it, so...
> 
> Fixed up the - vs _ thing and made it use mmap() while I was there.

Thanks!

I checked it, and found that there's one more difference...toybox
doesn't show firmware.  Easily solved with the attached patch.

(This is relevant because if a module is missing firmware,
it fails to load.  dmesg is an option, but that can take several
tries if it's a module that has five dozen firmware binaries.

It's also not an option for linux-libre, but that's not worth
bothering about since it's an FSF-created problem.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modinfo-fw.diff
Type: text/x-diff
Size: 496 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130425/36d0f1ce/attachment-0007.diff>


More information about the Toybox mailing list