diff options
-rw-r--r-- | usr.bin/kdump/kdump.c | 35 | ||||
-rw-r--r-- | usr.bin/kdump/mksubr | 12 |
2 files changed, 47 insertions, 0 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 0f1a26b..356bed3 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -606,6 +606,27 @@ ktrsyscall(struct ktr_syscall *ktr, u_int flags) if (fancy && (flags == 0 || (flags & SV_ABI_MASK) == SV_ABI_FREEBSD)) { switch (ktr->ktr_code) { + case SYS_faccessat: + case SYS_fchmodat: + case SYS_fchownat: + case SYS_fstatat: + case SYS_futimesat: + case SYS_linkat: + case SYS_mkdirat: + case SYS_mkfifoat: + case SYS_mknodat: + case SYS_openat: + case SYS_readlinkat: + case SYS_renameat: + case SYS_unlinkat: + putchar('('); + atfdname(*ip, decimal); + c = ','; + ip++; + narg--; + break; + } + switch (ktr->ktr_code) { case SYS_ioctl: { print_number(ip, narg, c); putchar(c); @@ -624,6 +645,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_int flags) break; case SYS_access: case SYS_eaccess: + case SYS_faccessat: print_number(ip, narg, c); putchar(','); accessmodename(*ip); @@ -631,6 +653,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_int flags) narg--; break; case SYS_open: + case SYS_openat: print_number(ip, narg, c); putchar(','); flagsandmodename(ip[0], ip[1], decimal); @@ -655,6 +678,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_int flags) narg--; break; case SYS_mknod: + case SYS_mknodat: print_number(ip, narg, c); putchar(','); modename(*ip); @@ -860,7 +884,9 @@ ktrsyscall(struct ktr_syscall *ktr, u_int flags) narg--; break; case SYS_mkfifo: + case SYS_mkfifoat: case SYS_mkdir: + case SYS_mkdirat: print_number(ip, narg, c); putchar(','); modename(*ip); @@ -1083,6 +1109,15 @@ ktrsyscall(struct ktr_syscall *ktr, u_int flags) ip++; narg--; break; + case SYS_linkat: + case SYS_renameat: + case SYS_symlinkat: + print_number(ip, narg, c); + putchar(','); + atfdname(*ip, decimal); + ip++; + narg--; + break; case SYS_cap_new: case SYS_cap_rights_limit: print_number(ip, narg, c); diff --git a/usr.bin/kdump/mksubr b/usr.bin/kdump/mksubr index aed8291..bb70d13 100644 --- a/usr.bin/kdump/mksubr +++ b/usr.bin/kdump/mksubr @@ -209,6 +209,18 @@ cat <<_EOF_ while (0) /* MANUAL */ +void +atfdname(int fd, int decimal) +{ + if (fd == AT_FDCWD) + printf("AT_FDCWD"); + else if (decimal) + printf("%d", fd); + else + printf("%#x", fd); +} + +/* MANUAL */ extern char *signames[]; /* from kdump.c */ void signame(int sig) |