diff options
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index d05ca3a..8829a9c 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#include "opt_ktrace.h" #include "opt_mac.h" #include <sys/param.h> @@ -67,6 +68,9 @@ __FBSDID("$FreeBSD$"); #include <sys/jail.h> #include <sys/syscallsubr.h> #include <sys/sysctl.h> +#ifdef KTRACE +#include <sys/ktrace.h> +#endif #include <machine/stdarg.h> @@ -2120,6 +2124,10 @@ kern_stat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp) if (error) return (error); *sbp = sb; +#ifdef KTRACE + if (KTRPOINT(td, KTR_STRUCT)) + ktrstat(&sb); +#endif return (0); } @@ -2171,6 +2179,10 @@ kern_lstat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp if (error) return (error); *sbp = sb; +#ifdef KTRACE + if (KTRPOINT(td, KTR_STRUCT)) + ktrstat(&sb); +#endif return (0); } |