summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2016-05-22 12:46:34 +0000
committerdchagin <dchagin@FreeBSD.org>2016-05-22 12:46:34 +0000
commit791b4b11220da33b615f8f806a4061700e6564dd (patch)
tree6bf6d1496b9fecfac4d84fe2df3b70ac6fd30429 /sys/amd64
parent29f5e6c1ad29946282d9bce4742cbe33d082526e (diff)
downloadFreeBSD-src-791b4b11220da33b615f8f806a4061700e6564dd.zip
FreeBSD-src-791b4b11220da33b615f8f806a4061700e6564dd.tar.gz
Add macro to convert errno and use it when appropriate.
MFC after: 1 week
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/vm_machdep.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index ff857bb..fc9e634 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -414,13 +414,7 @@ cpu_set_syscall_retval(struct thread *td, int error)
break;
default:
- if (td->td_proc->p_sysent->sv_errsize) {
- if (error >= td->td_proc->p_sysent->sv_errsize)
- error = -1; /* XXX */
- else
- error = td->td_proc->p_sysent->sv_errtbl[error];
- }
- td->td_frame->tf_rax = error;
+ td->td_frame->tf_rax = SV_ABI_ERRNO(td->td_proc, error);
td->td_frame->tf_rflags |= PSL_C;
break;
}
OpenPOWER on IntegriCloud