Module Name: src
Committed By: reinoud
Date: Mon Dec 12 19:57:12 UTC 2011
Modified Files:
src/sys/arch/usermode/usermode: machdep.c
Log Message:
Fix error flag (carry) setting if its a pseudo error of EJUSTRETURN etc. Just
in case.
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/usermode/usermode/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/usermode/usermode/machdep.c
diff -u src/sys/arch/usermode/usermode/machdep.c:1.33 src/sys/arch/usermode/usermode/machdep.c:1.34
--- src/sys/arch/usermode/usermode/machdep.c:1.33 Sun Nov 27 21:38:17 2011
+++ src/sys/arch/usermode/usermode/machdep.c Mon Dec 12 19:57:12 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.33 2011/11/27 21:38:17 reinoud Exp $ */
+/* $NetBSD: machdep.c,v 1.34 2011/12/12 19:57:12 reinoud Exp $ */
/*-
* Copyright (c) 2011 Reinoud Zandijk <[email protected]>
@@ -32,7 +32,7 @@
#include "opt_urkelvisor.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.33 2011/11/27 21:38:17 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.34 2011/12/12 19:57:12 reinoud Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -250,14 +250,14 @@ md_syscall_set_returnargs(lwp_t *l, ucon
register_t *reg = (register_t *) &ucp->uc_mcontext;
reg[16] &= ~PSL_C; /* EFL */
- if (error) {
+ if (error > 0) {
rval[0] = error;
reg[16] |= PSL_C; /* EFL */
}
/* set return parameters */
reg[11] = rval[0]; /* EAX */
- if (!error)
+ if (error == 0)
reg[ 9] = rval[1]; /* EDX */
//dump_regs(reg);