summaryrefslogtreecommitdiff
path: root/sbin/savecore
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2009-06-20 00:15:15 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2009-06-20 00:15:15 +0000
commit1d9712362828ff17e62469c2ad107cf14093337e (patch)
tree118a6481bca174e7f57d24861d0722c53843c428 /sbin/savecore
parente599c76f1fdad5235141cad7a97f825a3038a985 (diff)
If the user didn't specify a kernel, pass in NULL to kvm_openfiles()
so it can try /dev/ksyms. The first call to kvm_openfiles() was already correct.
Diffstat (limited to 'sbin/savecore')
-rw-r--r--sbin/savecore/savecore.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c
index 9e84e726582..f10b54add91 100644
--- a/sbin/savecore/savecore.c
+++ b/sbin/savecore/savecore.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: savecore.c,v 1.46 2009/01/17 13:48:50 miod Exp $ */
+/* $OpenBSD: savecore.c,v 1.47 2009/06/20 00:15:14 millert Exp $ */
/* $NetBSD: savecore.c,v 1.26 1996/03/18 21:16:05 leo Exp $ */
/*-
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)savecore.c 8.3 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: savecore.c,v 1.46 2009/01/17 13:48:50 miod Exp $";
+static char rcsid[] = "$OpenBSD: savecore.c,v 1.47 2009/06/20 00:15:14 millert Exp $";
#endif
#endif /* not lint */
@@ -270,8 +270,7 @@ kmem_setup(void)
dumpfd = Open(ddname, O_RDWR);
dump_sys = kernel ? kernel : _PATH_UNIX;
-
- kd_dump = kvm_openfiles(dump_sys, ddname, NULL, O_RDWR, errbuf);
+ kd_dump = kvm_openfiles(kernel, ddname, NULL, O_RDWR, errbuf);
if (kd_dump == NULL) {
syslog(LOG_ERR, "%s: kvm_openfiles: %s", dump_sys, errbuf);
exit(1);