Module Name:    src
Committed By:   manu
Date:           Mon May 25 03:56:20 UTC 2015

Modified Files:
        src/usr.bin/netstat: route.c

Log Message:
Make sure netstat builds with -DSMALL

src/usr.bin/netstat relies on code from src/sbin/route. WHen building
with -DSMALL, some functions such as mpls_ntoa() or p_rtrmx() are not
built in src/sbin/route. We therefore have to make sure they are not
used in src/usr.bin/netstat.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/usr.bin/netstat/route.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/netstat/route.c
diff -u src/usr.bin/netstat/route.c:1.83 src/usr.bin/netstat/route.c:1.84
--- src/usr.bin/netstat/route.c:1.83	Thu Nov  6 21:30:09 2014
+++ src/usr.bin/netstat/route.c	Mon May 25 03:56:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.83 2014/11/06 21:30:09 christos Exp $	*/
+/*	$NetBSD: route.c,v 1.84 2015/05/25 03:56:20 manu Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "from: @(#)route.c	8.3 (Berkeley) 3/9/94";
 #else
-__RCSID("$NetBSD: route.c,v 1.83 2014/11/06 21:30:09 christos Exp $");
+__RCSID("$NetBSD: route.c,v 1.84 2015/05/25 03:56:20 manu Exp $");
 #endif
 #endif /* not lint */
 
@@ -262,6 +262,7 @@ p_krtentry(struct rtentry *rt)
 		printf("%6s", "-");
 	putchar((rt->rt_rmx.rmx_locks & RTV_MTU) ? 'L' : ' ');
 	if (tagflag == 1) {
+#ifndef SMALL
 		if (rt->rt_tag != NULL) {
 			const struct sockaddr *tagsa = kgetsa(rt->rt_tag);
 			char *tagstr;
@@ -276,6 +277,7 @@ p_krtentry(struct rtentry *rt)
 			else
 				printf("%7s", "-");
 		} else
+#endif
 			printf("%7s", "-");
 	}
 	if (rt->rt_ifp) {
@@ -287,8 +289,10 @@ p_krtentry(struct rtentry *rt)
 			rt->rt_nodes[0].rn_dupedkey ? " =>" : "");
 	}
 	putchar('\n');
+#ifndef SMALL
 	if (vflag)
 		p_rtrmx(&rt->rt_rmx);
+#endif
 }
 
 /*

Reply via email to