bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] Argpifying ifconfig.


From: Sergey Poznyakoff
Subject: Re: [bug-inetutils] Argpifying ifconfig.
Date: Tue, 03 Apr 2007 14:46:50 +0300

Debarshi 'Rishi' Ray <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]