[PATCH 17/19] insmod: implement -q flag
Denys Vlasenko
vda.linux at googlemail.com
Sun Sep 30 07:13:33 UTC 2012
On Tue, Sep 25, 2012 at 2:06 PM, Florian Fainelli <florian at alphacore.org> wrote:
> From: Jo-Philipp Wich <jow at openwrt.org>
>
> And suppress errors when this flag is set.
>
> Signed-off-by: Jo-Philipp Wich <jow at openwrt.org>
> ---
> modutils/insmod.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/modutils/insmod.c b/modutils/insmod.c
> index 887d9f2..22bac1f 100644
> --- a/modutils/insmod.c
> +++ b/modutils/insmod.c
> @@ -39,7 +39,7 @@ int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
> int insmod_main(int argc UNUSED_PARAM, char **argv)
> {
> char *filename;
> - int rc;
> + int rc, opt;
>
> /* Compat note:
> * 2.6 style insmod has no options and required filename
> @@ -49,17 +49,15 @@ int insmod_main(int argc UNUSED_PARAM, char **argv)
> * or in $MODPATH.
> */
>
> - IF_FEATURE_2_4_MODULES(
> - getopt32(argv, INSMOD_OPTS INSMOD_ARGS);
> - argv += optind - 1;
> - );
> + opt = getopt32(argv, INSMOD_OPTS, NULL, NULL);
> + argv += optind - 1;
This makes 2.6 insmod support options.
Which introduces incompatibility with standard
2.6 insmod, which does not accept any options.
More information about the busybox
mailing list