[Toybox] Modinfo parm/parmtype patch

Isaac idunham at lavabit.com
Sun Jul 7 15:42:45 PDT 2013


On Mon, Jul 08, 2013 at 09:47:15AM +1200, Andre Renaud wrote:
> Hi,
> 
> Modinfo treats 'parm' and 'parmtype' the same, and prefixes them both
> with 'parm'. I'm not sure if we're just using the existing modinfo
> output as a spec, or if there is a better way of determining what is
> correct. This patch makes the output more in line with
> module-init-tools modinfo (although busybox modinfo has the same
> problem as the current toybox, so perhaps this isn't really a
> problem).
> 
> Regards,
> Andre

Per my own testing, that's not /exactly/ how it works...
The structure in the module is more-or-less 

parm=option:brief description
parmtype=option:datatype

(for example, int, bool, string)

The output of modinfo -F parm:
option:brief description

The output of modinfo -F parmtype:
option:datatype

The output of modinfo |grep parm:
parm:		option:brief description (datatype)


Of course this might be a little trickier to duplicate.
I expect it would take parsing parm/parmtype separately from the rest of 
the fields.  Yuck.
I doubt that many scripts parse the output of modinfo, but if one did,
outputting the parmtype field with "parm:" would be likely to break things...
So I'd be inclined to say just add the parmtype field without the second line.
But then, it might be sensible to move "parm" so it's just before "parmtype".


The version of modinfo I'm testing:

Package: module-init-tools
Priority: required
Section: admin
Installed-Size: 352
Maintainer: Scott James Remnant <scott at ubuntu.com>
Architecture: i386
Version: 3.11.1-2ubuntu1

(Ubuntu Lucid 10.04)

HTH,
Isaac Dunham


 1373236965.0


More information about the Toybox mailing list