summaryrefslogtreecommitdiff
path: root/sys/kern/kern_descrip.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2011-07-08 19:28:39 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2011-07-08 19:28:39 +0000
commitdfa0ffc7c86951f332886c661e930a834f5c9a36 (patch)
tree0a28f66f3a8e7dca583b98c9de12dbfcaac78e3a /sys/kern/kern_descrip.c
parent7cdbb0a9da84b2132739098e79e1d64e2be81c79 (diff)
Support sending struct info to kdump. So far for struct stat and
struct sockaddress; mostly from freebsd. ok deraadt@ tedu@ nicm@
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r--sys/kern/kern_descrip.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 0d3a6d1a627..7ead57404e6 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.86 2011/04/02 17:04:35 guenther Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.87 2011/07/08 19:28:36 otto Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -59,6 +59,7 @@
#include <sys/syscallargs.h>
#include <sys/event.h>
#include <sys/pool.h>
+#include <sys/ktrace.h>
#include <uvm/uvm_extern.h>
@@ -632,6 +633,10 @@ sys_fstat(struct proc *p, void *v, register_t *retval)
error = copyout((caddr_t)&ub, (caddr_t)SCARG(uap, sb),
sizeof (ub));
}
+#ifdef KTRACE
+ if (error == 0 && KTRPOINT(p, KTR_STRUCT))
+ ktrstat(p, &ub);
+#endif
return (error);
}