Debarshi 'Rishi' Ray <[EMAIL PROTECTED]> wrote:

> Here (http://glug-nith.org/~rishi/download/src/ifconfig-argp.diff) is
> the current state of my patch to argpify ifconfig. Whenever I call
> 'argp_parse (&argp, argc, argv, 0, 0, NULL)' instead of 'argp_parse
> (&argp, argc, argv, 0, &index, NULL)' in main (), things like:
> $ ifconfig lo
> $ ifconfig lo 127.0.0.3
> give an error-- 'Too many arguments'.

It is intended. This error is reported if:

1) The 5th argument to argp_parse is NULL

and

2) The parsing function does not handle ARGP_KEY_ARG

If both these conditions are met, it means that the program
does not want any non-option arguments.

> Since I do not need 'index' in main (), I want to get rid of it.

Then how do you plan to handle traditional ifconfig invocation?

Regards,
Sergey


_______________________________________________
bug-inetutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-inetutils

Reply via email to