@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc_notalpha.c,v 1.103 2008/07/15 16:18:08 christos Exp $ */
+/* $NetBSD: linux_misc_notalpha.c,v 1.104 2008/10/03 22:39:36 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.103 2008/07/15 16:18:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.104 2008/10/03 22:39:36 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -199,11 +199,13 @@
/* {
syscallarg(int) incr;
} */
+ struct proc *p = l->l_proc;
struct sys_setpriority_args bsa;
SCARG(&bsa, which) = PRIO_PROCESS;
SCARG(&bsa, who) = 0;
- SCARG(&bsa, prio) = SCARG(uap, incr);
+ SCARG(&bsa, prio) = p->p_nice - NZERO + SCARG(uap, incr);
+
return sys_setpriority(l, &bsa, retval);
}
#endif /* !__amd64__ */
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_unistd.c,v 1.23 2008/09/22 13:07:46 njoly Exp $ */
+/* $NetBSD: linux32_unistd.c,v 1.24 2008/10/03 22:39:36 njoly Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.23 2008/09/22 13:07:46 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.24 2008/10/03 22:39:36 njoly Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -391,11 +391,12 @@
/* {
syscallarg(int) incr;
} */
+ struct proc *p = l->l_proc;
struct sys_setpriority_args bsa;
SCARG(&bsa, which) = PRIO_PROCESS;
SCARG(&bsa, who) = 0;
- SCARG(&bsa, prio) = SCARG(uap, incr);
+ SCARG(&bsa, prio) = p->p_nice - NZERO + SCARG(uap, incr);
return sys_setpriority(l, &bsa, retval);
}