summaryrefslogtreecommitdiff
path: root/usr.sbin/kgmon
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
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')
-rw-r--r--usr.sbin/kgmon/kgmon.88
-rw-r--r--usr.sbin/kgmon/kgmon.c9
2 files changed, 8 insertions, 9 deletions
diff --git a/usr.sbin/kgmon/kgmon.8 b/usr.sbin/kgmon/kgmon.8
index c80acd1cd3c..acdd310d7c9 100644
--- a/usr.sbin/kgmon/kgmon.8
+++ b/usr.sbin/kgmon/kgmon.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: kgmon.8,v 1.2 1996/05/01 22:15:21 niklas Exp $
+.\" $OpenBSD: kgmon.8,v 1.3 1998/12/20 23:59:18 millert Exp $
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -31,7 +31,7 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)kgmon.8 8.1 (Berkeley) 6/6/93
-.\" $Id: kgmon.8,v 1.2 1996/05/01 22:15:21 niklas Exp $
+.\" $Id: kgmon.8,v 1.3 1998/12/20 23:59:18 millert Exp $
.\"
.Dd June 6, 1993
.Dt KGMON 8
@@ -42,8 +42,8 @@
.Sh SYNOPSIS
.Nm kgmon
.Op Fl bhpr
-.Op Fl M core
-.Op Fl N system
+.Op Fl M Ar core
+.Op Fl N Ar system
.Sh DESCRIPTION
.Nm Kgmon
is a tool used when profiling the operating system.
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) {