summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2011-07-07 06:39:49 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2011-07-07 06:39:49 +0000
commit168978c5c9dda62d690f1bdefb92af80b899ab43 (patch)
tree43d18d0b7c41bdfc6cd7e8d441b6bcc79f0ed821 /usr.bin
parentb55367653c05e7f7a3ceee550d9489398cfc3007 (diff)
Don't crash on non-native emuls; ok guenther@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/kdump/kdump.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index c4dd56aa181..2b88b181017 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kdump.c,v 1.53 2011/07/04 22:59:43 tedu Exp $ */
+/* $OpenBSD: kdump.c,v 1.54 2011/07/07 06:39:48 otto Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -423,6 +423,9 @@ ktrsyscall(struct ktr_syscall *ktr)
ap = (register_t *)((char *)ktr + sizeof(struct ktr_syscall));
(void)putchar('(');
+ if (current != &emulations[0])
+ goto nonnative;
+
switch (ktr->ktr_code) {
case SYS_ioctl: {
const char *cp;
@@ -660,6 +663,7 @@ ktrsyscall(struct ktr_syscall *ktr)
break;
}
+nonnative:
while (narg) {
if (sep)
putchar(sep);