[BusyBox 0001076]: "ip addr del" does not work

Denis Vlasenko vda.linux at googlemail.com
Thu Oct 26 00:38:27 UTC 2006


On Wednesday 25 October 2006 18:06, Bernhard Fischer wrote:
> >---------------------------------------------------------------------- 
> > Andreas Winter - 10-25-06 03:26  
> >---------------------------------------------------------------------- 
> >To be more precise: del should work in addition to delete 
> >
> >---------------------------------------------------------------------- 
> > bernhardf - 10-25-06 09:01  
> >---------------------------------------------------------------------- 
> >I disagree. ip addr delete should still be supported, so you cannot simply
> >change "delete" to "del" there.
> >
> >The attached snippet uses strncmp(,key,strlen(key)) rather than strcmp.
> >This does not catch ambiguous args when you compare the string_array.
> >
> >For this to work, we'd need to keep track on how many matches we got and
> >bail if matches > 1.
> >
> >For the ip applet, the strncmp thing should do it for now, though. 
> 
> What do you think about keeping track of the number of matches to catch
> if we've seen ambiguous matches in compare_string_array?

int do_ipaddr(int argc, char **argv)
{
        static const char *const commands[] = {
                "add", "delete", "list", "show", "lst", "flush", 0
        };

I think adding "del" here will be perfectly ok.
(do_iproute has "del" and "delete, for example).

I am committing this change.

Thank you guys.
--
vda



More information about the busybox mailing list