=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/nfsstat/nfsstat.c,v retrieving revision 1.15 retrieving revision 1.16 diff -c -r1.15 -r1.16 *** src/usr.bin/nfsstat/nfsstat.c 2003/01/15 21:25:44 1.15 --- src/usr.bin/nfsstat/nfsstat.c 2003/01/15 22:20:15 1.16 *************** *** 1,4 **** ! /* $OpenBSD: nfsstat.c,v 1.15 2003/01/15 21:25:44 millert Exp $ */ /* $NetBSD: nfsstat.c,v 1.7 1996/03/03 17:21:30 thorpej Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: nfsstat.c,v 1.16 2003/01/15 22:20:15 millert Exp $ */ /* $NetBSD: nfsstat.c,v 1.7 1996/03/03 17:21:30 thorpej Exp $ */ /* *************** *** 48,54 **** static char sccsid[] = "from: @(#)nfsstat.c 8.1 (Berkeley) 6/6/93"; static char *rcsid = "$NetBSD: nfsstat.c,v 1.7 1996/03/03 17:21:30 thorpej Exp $"; #else ! static char *rcsid = "$OpenBSD: nfsstat.c,v 1.15 2003/01/15 21:25:44 millert Exp $"; #endif #endif /* not lint */ --- 48,54 ---- static char sccsid[] = "from: @(#)nfsstat.c 8.1 (Berkeley) 6/6/93"; static char *rcsid = "$NetBSD: nfsstat.c,v 1.7 1996/03/03 17:21:30 thorpej Exp $"; #else ! static char *rcsid = "$OpenBSD: nfsstat.c,v 1.16 2003/01/15 22:20:15 millert Exp $"; #endif #endif /* not lint */ *************** *** 161,167 **** if (sysctl(mib, 3, &nfs_id, &len, NULL, 0)) err(1, "sysctl: VFS_MAXTYPENUM"); ! do { struct vfsconf vfsc; mib[0] = CTL_VFS; --- 161,167 ---- if (sysctl(mib, 3, &nfs_id, &len, NULL, 0)) err(1, "sysctl: VFS_MAXTYPENUM"); ! for (; nfs_id; nfs_id--) { struct vfsconf vfsc; mib[0] = CTL_VFS; *************** *** 175,183 **** if (!strcmp(vfsc.vfc_name, MOUNT_NFS)) break; ! } while (--nfs_id); ! ! if (nfs_id < 0) errx(1, "cannot find nfs filesystem id"); } --- 175,182 ---- if (!strcmp(vfsc.vfc_name, MOUNT_NFS)) break; ! } ! if (nfs_id == 0) errx(1, "cannot find nfs filesystem id"); }