summaryrefslogtreecommitdiff
path: root/usr.sbin/kgmon/kgmon.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-12-20 23:59:19 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-12-20 23:59:19 +0000
commitae8c04fb6a693db3aef6224acb7bd8cb9d39288c (patch)
treec1304728d4724d4f978fdd2fee19bb535e677534 /usr.sbin/kgmon/kgmon.c
parentf09581ed71387247953591b67cf6bd66e73f0277 (diff)
Don't assume /bsd if no system given, let the kvm routines pick a default (and thus use kvm_bsd.db if possible). Also minor manpage fixup.
Diffstat (limited to 'usr.sbin/kgmon/kgmon.c')
-rw-r--r--usr.sbin/kgmon/kgmon.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/kgmon/kgmon.c b/usr.sbin/kgmon/kgmon.c
index f1e11503d74..9159b438566 100644
--- a/usr.sbin/kgmon/kgmon.c
+++ b/usr.sbin/kgmon/kgmon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kgmon.c,v 1.3 1997/01/15 23:44:02 millert Exp $ */
+/* $OpenBSD: kgmon.c,v 1.4 1998/12/20 23:59:18 millert Exp $ */
/*
* Copyright (c) 1983, 1992, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)kgmon.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$OpenBSD: kgmon.c,v 1.3 1997/01/15 23:44:02 millert Exp $";
+static char *rcsid = "$OpenBSD: kgmon.c,v 1.4 1998/12/20 23:59:18 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -136,8 +136,6 @@ main(int argc, char **argv)
}
}
#endif
- if (system == NULL)
- system = _PATH_UNIX;
accessmode = openfiles(system, kmemf, &kvmvars);
mode = getprof(&kvmvars);
if (hflag)
@@ -205,7 +203,8 @@ openfiles(system, kmemf, kvp)
kern_readonly(GMON_PROF_ON);
}
if (kvm_nlist(kvp->kd, nl) < 0) {
- (void)fprintf(stderr, "kgmon: %s: no namelist\n", system);
+ (void)fprintf(stderr, "kgmon: %s: no namelist\n",
+ system ? system : _PATH_UNIX);
exit(3);
}
if (!nl[N_GMONPARAM].n_value) {