Sign extend the error value for failing Linux/i386 system calls. This
restores the mapping of Linux errors to native FreeBSD errno values after the refactoring in r288424.
This commit is contained in:
parent
501ce0d86b
commit
142482cda6
@ -115,6 +115,8 @@ amd64_linux32_fetch_retval(struct trussinfo *trussinfo, long *retval,
|
||||
retval[0] = regs.r_rax & 0xffffffff;
|
||||
retval[1] = regs.r_rdx & 0xffffffff;
|
||||
*errorp = !!(regs.r_rflags & PSL_C);
|
||||
if (*errorp)
|
||||
retval[0] = (int)retval[0];
|
||||
|
||||
if (*errorp) {
|
||||
for (i = 0; i < nitems(bsd_to_linux_errno); i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user