[BusyBox] patch to add "-n" option to route

arne @ loopback . org arne at matrix.loopback.org
Mon Aug 27 06:01:27 UTC 2001


Hi,

as i have the problem i am alway typing route -n instead of route, i found
it useful that bb knows about this option...

Yes, i know bb route shows the numeric output without the -n switch...

attached is a very small (and maybe dirty...) patch , it adds about 32 Bytes
to the bb executable...

I would have made some IFDEFs  to enable this in COnfig.h , but this might
be not worth the work for 32 Bytes, or am I wrong there???

--arne 
-------------------------------------------------------------------­---
Arne Bernin                            	Netropol Digitale Systeme
					Lagerstrasse 30a                        
Tel: +49 4043250000                     D-20357 Hamburg/Germany
Fax: +49 4028416740   	                ab at Netropol.de    

-----------------------------------------------------------------------
                                                             
Fppmpppff mpmmmmfmm mfpmffmpppff pmfmppfmmmppppp pmpmmmpppppp mfffmmfmp
fmmmmfmfppmfmmmfmf!

    
-------------- next part --------------
--- route.c.orig	Mon Aug 27 13:40:06 2001
+++ route.c	Mon Aug 27 13:54:30 2001
@@ -412,7 +412,7 @@
 	argc--;
 	argv++;
 
-	if (*argv == NULL) {
+	if (*argv == NULL || strcmp(*argv, "-n") == 0) {
 		displayroutes();
 		return EXIT_SUCCESS;
 	} else {


More information about the busybox mailing list