Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jun 2017 00:35:45 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r319761 - head/usr.bin/kdump
Message-ID:  <201706100035.v5A0Zjer068658@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706100035.v5A0Zjer068658>