From 6503b7ab8d618630e8e1d6edc5d7e397e7dcca26 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 4 Jul 2007 23:32:49 +0000 Subject: [PATCH] kdump has knowledge of lseek() and mmap() arg decoding. Teach it about the new mmap and lseek syscalls. Approved by: re (kensmith) --- usr.bin/kdump/kdump.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 508eb5c3bcb0..14258633ddc6 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -453,6 +453,19 @@ ktrsyscall(struct ktr_syscall *ktr) msyncflagsname((int)*ip); ip++; narg--; +#ifdef SYS_freebsd6_mmap + } else if (ktr->ktr_code == SYS_freebsd6_mmap) { + print_number(ip,narg,c); + print_number(ip,narg,c); + (void)putchar(','); + mmapprotname ((int)*ip); + (void)putchar(','); + ip++; + narg--; + mmapflagsname ((int)*ip); + ip++; + narg--; +#endif } else if (ktr->ktr_code == SYS_mmap) { print_number(ip,narg,c); print_number(ip,narg,c); @@ -525,7 +538,8 @@ ktrsyscall(struct ktr_syscall *ktr) sockoptname((int)*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_lseek) { +#ifdef SYS_freebsd6_lseek + } else if (ktr->ktr_code == SYS_freebsd6_lseek) { print_number(ip,narg,c); /* Hidden 'pad' argument, not in lseek(2) */ print_number(ip,narg,c); @@ -534,6 +548,16 @@ ktrsyscall(struct ktr_syscall *ktr) whencename ((int)*ip); ip++; narg--; +#endif + } else if (ktr->ktr_code == SYS_lseek) { + print_number(ip,narg,c); + /* Hidden 'pad' argument, not in lseek(2) */ + print_number(ip,narg,c); + (void)putchar(','); + whencename ((int)*ip); + ip++; + narg--; + } else if (ktr->ktr_code == SYS_flock) { print_number(ip,narg,c); (void)putchar(',');