Author: jhb
Date: Sat Jun 10 00:35:45 2017
New Revision: 319761
URL: https://svnweb.freebsd.org/changeset/base/319761

Log:
  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).

Modified:
  head/usr.bin/kdump/kdump.c

Modified: head/usr.bin/kdump/kdump.c
==============================================================================
--- head/usr.bin/kdump/kdump.c  Fri Jun  9 20:38:18 2017        (r319760)
+++ head/usr.bin/kdump/kdump.c  Sat Jun 10 00:35:45 2017        (r319761)
@@ -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;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to