diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-01-15 21:20:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-01-15 21:20:04 +0000 |
commit | ed17ed736b23311e791e1b0c70c98a0d05bf6470 (patch) | |
tree | 4157fe545852a99c9f98715f53ac987492dbb02b /usr.bin/nfsstat/nfsstat.c | |
parent | 2e295dd3dc0c8999d717f3daa84546218e119d34 (diff) |
cope with nfs being last in the list
Diffstat (limited to 'usr.bin/nfsstat/nfsstat.c')
-rw-r--r-- | usr.bin/nfsstat/nfsstat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index 06d3d26a089..f4f8182808c 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfsstat.c,v 1.13 2002/02/16 21:27:50 millert Exp $ */ +/* $OpenBSD: nfsstat.c,v 1.14 2003/01/15 21:20:03 deraadt Exp $ */ /* $NetBSD: nfsstat.c,v 1.7 1996/03/03 17:21:30 thorpej Exp $ */ /* @@ -48,7 +48,7 @@ static char copyright[] = 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.13 2002/02/16 21:27:50 millert Exp $"; +static char *rcsid = "$OpenBSD: nfsstat.c,v 1.14 2003/01/15 21:20:03 deraadt Exp $"; #endif #endif /* not lint */ @@ -161,7 +161,7 @@ main(argc, argv) if (sysctl(mib, 3, &nfs_id, &len, NULL, 0)) err(1, "sysctl: VFS_MAXTYPENUM"); - while (nfs_id--) { + do { struct vfsconf vfsc; mib[0] = CTL_VFS; @@ -175,7 +175,7 @@ main(argc, argv) if (!strcmp(vfsc.vfc_name, MOUNT_NFS)) break; - } + } while (--nfs_id); if (nfs_id < 0) errx(1, "cannot find nfs filesystem id"); |