[PATCH] modprobe and multiple options to modules
Yann E. MORIN
yann.morin.1998 at anciens.enib.fr
Thu Sep 29 06:53:40 UTC 2005
Hi list!
Rob,
Quoting Rob Landley <rob at landley.net>:
> The code you've done isn't generic (nothing else is going to use mod_list_t),
> but the general concept is. It seems like what you want is the ability to
> call some parse_command_string() function and have it append the split-up
> results to an argv[] you pass. With details like error handling, bounds
> checking on the argv[] array
OK, see below.
> (or possibly dynamically allocating the sucker,
> the MODPROBE_OPTIONS_NUMBER is a bit clumsy)...
Yeah, that was a quick fix, just for validating the parsing code.
> Tell you what: can you rename the parse function to parse_command_string(),
> move the do() loop outside so it doesn't have to know about the
> module-specific structure? That way we can easily move this function to a
> separate file later to do more work on it and re-use it elsewhere,
OK, I'm re-factoring it.
> but for
> right now we can just check in a fix to modprobe without blocking the fix on
> the later work.
Yes, but the patch I sent is, IMHO, twisted because it doesn't allow quotes
nesting. Plus it keeps the quotes around arguments, which it shouldn't. Plus
it doesn't do escaping. Plus... Bahhh...
Anyway, thanks for the review, I'll take your word into account. I'm putting
together all this in some new code that will hopefully be usefull to you.
Regards,
Yann E. MORIN.
--
Yann E. MORIN
Roaming in the world...
More information about the busybox
mailing list