Module Name: src
Committed By: snj
Date: Mon Jun 1 19:22:31 UTC 2015
Modified Files:
src/usr.bin/netstat [netbsd-7]: route.c
Log Message:
Pull up following revision(s) (requested by manu in ticket #809):
usr.bin/netstat/route.c: revision 1.84
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.82.2.1 -r1.82.2.2 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.82.2.1 src/usr.bin/netstat/route.c:1.82.2.2
--- src/usr.bin/netstat/route.c:1.82.2.1 Thu Jan 8 11:01:01 2015
+++ src/usr.bin/netstat/route.c Mon Jun 1 19:22:31 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.82.2.1 2015/01/08 11:01:01 martin Exp $ */
+/* $NetBSD: route.c,v 1.82.2.2 2015/06/01 19:22:31 snj 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.82.2.1 2015/01/08 11:01:01 martin Exp $");
+__RCSID("$NetBSD: route.c,v 1.82.2.2 2015/06/01 19:22:31 snj 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
}
/*