From 9483ab16d4edd9f9f2dd10c9450544a7dda93338 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Sat, 10 Jun 2017 00:35:45 +0000 Subject: [PATCH] Fix decoding of setpriority() arguments. The PRIO_* 'which' value is stored in the first argument to setpriority(2), not the last. While here, decode the arguments to getpriority(2). --- usr.bin/kdump/kdump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 262396169d6d..2bce182d6855 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -1060,11 +1060,11 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags) ip++; narg--; break; + case SYS_getpriority: case SYS_setpriority: - print_number(ip, narg, c); - print_number(ip, narg, c); - putchar(','); + putchar('('); print_integer_arg(sysdecode_prio_which, *ip); + c = ','; ip++; narg--; break;