[Toybox] Modinfo parm/parmtype patch

Andre Renaud andre at bluewatersys.com
Sun Jul 7 15:57:41 PDT 2013


> 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".

Yes, you're correct - the only way to handle that output type is to
buffer the parm/parmtype options until the end, and then intelligently
merge them. For such a minimal toy that doesn't really seem like a
sensible thing to do.
I guess the question is how close to the module-init-tools modinfo do
we want to be? I expect that we don't really want to be particularly
close if the code complexity cost is high. The simplest solution is
probably just to add parmtype in to the list of tags and leave it at
that. At least that way all the useful information is displayed so
people can read it.

I've never seen any scripts that parse modinfo, and given busybox
doesn't support this either it probably isn't worth worrying about.

Regards,
Andre

 1373237861.0


More information about the Toybox mailing list