[Toybox] Differences between modinfo in toybox and standard version
Rob Landley
rob at landley.net
Wed Apr 24 01:04:53 PDT 2013
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:
> > >Hello,
> > >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.
> >
> > Happy to accept patches, but I'm not currently up to speed on the
> > corner cases of module loading and haven't got spare brain to fit it
> > in just now. (If I read through it in the half hour this starbucks
> > is still open, I won't finish and will forget what I read by
> > morning.)
Ok, now I've done so, and... that's potentially vulnerable to false
positives?
I'm all for doing the simplest correct implementation of stuff, and
even the simplest correct implementation of interesting subsets of the
problem space. But this is grep on a binary. Hmmm.
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.
Rob
More information about the Toybox
mailing list