Module Name:    src
Committed By:   rmind
Date:           Fri May 30 01:44:21 UTC 2014

Modified Files:
        src/usr.bin/netstat: main.c
        src/usr.sbin/ifmcstat: ifmcstat.c

Log Message:
netstat(1) and ifmcstat(8): ifnet was renamed to ifnet_list, PR/48850.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/usr.bin/netstat/main.c
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/ifmcstat/ifmcstat.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/main.c
diff -u src/usr.bin/netstat/main.c:1.90 src/usr.bin/netstat/main.c:1.91
--- src/usr.bin/netstat/main.c:1.90	Mon Apr 28 15:41:15 2014
+++ src/usr.bin/netstat/main.c	Fri May 30 01:44:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.90 2014/04/28 15:41:15 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.91 2014/05/30 01:44:21 rmind Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "from: @(#)main.c	8.4 (Berkeley) 3/1/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.90 2014/04/28 15:41:15 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.91 2014/05/30 01:44:21 rmind Exp $");
 #endif
 #endif /* not lint */
 
@@ -79,8 +79,8 @@ struct nlist nl[] = {
 	{ "_udbtable", 0, 0, 0, 0 },
 #define	N_UDPSTAT	5
 	{ "_udpstat", 0, 0, 0, 0 },	/* not available via kvm */
-#define	N_IFNET		6
-	{ "_ifnet", 0, 0, 0, 0 },
+#define	N_IFNET_LIST		6
+	{ "_ifnet_list", 0, 0, 0, 0 },
 #define	N_ICMPSTAT	7
 	{ "_icmpstat", 0, 0, 0, 0 },	/* not available via kvm */
 #define	N_RTSTAT	8
@@ -570,7 +570,7 @@ main(int argc, char *argv[])
 	}
 	if (pflag) {
 		if (iflag && tp->pr_istats)
-			intpr(interval, nl[N_IFNET].n_value, tp->pr_istats);
+			intpr(interval, nl[N_IFNET_LIST].n_value, tp->pr_istats);
 		else if (tp->pr_stats)
 			(*tp->pr_stats)(nl[tp->pr_sindex].n_value,
 				tp->pr_name);
@@ -624,7 +624,7 @@ main(int argc, char *argv[])
 			if (af != AF_UNSPEC)
 				goto protostat;
 
-			intpr(interval, nl[N_IFNET].n_value, NULL);
+			intpr(interval, nl[N_IFNET_LIST].n_value, NULL);
 			break;
 		}
 		if (rflag) {
@@ -723,7 +723,7 @@ printproto(struct protox *tp, const char
 	if (sflag) {
 		if (iflag) {
 			if (tp->pr_istats)
-				intpr(interval, nl[N_IFNET].n_value,
+				intpr(interval, nl[N_IFNET_LIST].n_value,
 				      tp->pr_istats);
 			return;
 		}

Index: src/usr.sbin/ifmcstat/ifmcstat.c
diff -u src/usr.sbin/ifmcstat/ifmcstat.c:1.12 src/usr.sbin/ifmcstat/ifmcstat.c:1.13
--- src/usr.sbin/ifmcstat/ifmcstat.c:1.12	Sat Oct 19 17:16:25 2013
+++ src/usr.sbin/ifmcstat/ifmcstat.c	Fri May 30 01:44:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ifmcstat.c,v 1.12 2013/10/19 17:16:25 christos Exp $	*/
+/*	$NetBSD: ifmcstat.c,v 1.13 2014/05/30 01:44:21 rmind Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,8 +65,8 @@
 kvm_t	*kvmd;
 
 struct	nlist nl[] = {
-#define	N_IFNET	0
-	{ "_ifnet", 0, 0, 0, 0 },
+#define	N_IFNET_LIST	0
+	{ "_ifnet_list", 0, 0, 0, 0 },
 #if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
 #define N_IN6_MK 1
 	{ "_in6_mk", 0, 0, 0, 0 },
@@ -149,11 +149,11 @@ int main()
 		perror("kvm_nlist");
 		exit(1);
 	}
-	if (nl[N_IFNET].n_value == 0) {
-		printf("symbol %s not found\n", nl[N_IFNET].n_name);
+	if (nl[N_IFNET_LIST].n_value == 0) {
+		printf("symbol %s not found\n", nl[N_IFNET_LIST].n_name);
 		exit(1);
 	}
-	KREAD(nl[N_IFNET].n_value, &ifp, struct ifnet *);
+	KREAD(nl[N_IFNET_LIST].n_value, &ifp, struct ifnet *);
 	while (ifp) {
 		KREAD(ifp, &ifnet, struct ifnet);
 		printf("%s:\n", if_indextoname(ifnet.if_index, ifnam));

Reply via email to