=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/netstat/if.c,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** src/usr.bin/netstat/if.c 1996/06/16 12:42:29 1.5 --- src/usr.bin/netstat/if.c 1996/06/18 09:58:05 1.6 *************** *** 1,4 **** ! /* $NetBSD: if.c,v 1.16.4.1 1996/06/04 20:27:06 cgd Exp $ */ /* * Copyright (c) 1983, 1988, 1993 --- 1,4 ---- ! /* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */ /* * Copyright (c) 1983, 1988, 1993 *************** *** 37,43 **** #if 0 static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; #else ! static char *rcsid = "$NetBSD: if.c,v 1.16.4.1 1996/06/04 20:27:06 cgd Exp $"; #endif #endif /* not lint */ --- 37,43 ---- #if 0 static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; #else ! static char *rcsid = "$NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $"; #endif #endif /* not lint */ *************** *** 295,306 **** for (off = firstifnet, ip = iftot; off;) { if (kread(off, (char *)&ifnet, sizeof ifnet)) break; ! ip->ift_name[0] = '('; ! bcopy(ifnet.if_xname, ip->ift_name + 1, IFNAMSIZ - 1); ! if (interface && ! strcmp(ip->ift_name + 1, interface) == 0) interesting = ip; - ip->ift_name[IFNAMSIZ - 1] = '\0'; ip++; if (ip >= iftot + MAXIF - 2) break; --- 295,304 ---- for (off = firstifnet, ip = iftot; off;) { if (kread(off, (char *)&ifnet, sizeof ifnet)) break; ! bzero(ip->ift_name, sizeof(ip->ift_name)); ! snprintf(ip->ift_name, IFNAMSIZ, "(%s)", ifnet.if_xname); ! if (interface && strcmp(ifnet.if_xname, interface) == 0) interesting = ip; ip++; if (ip >= iftot + MAXIF - 2) break;