Use SV_ABI_ERRNO to set the syscall return value. The Linuxulator will

need this.

Submitted by:	Grégory Soutadé <soutade@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D7976
This commit is contained in:
Andrew Turner 2016-09-29 17:13:17 +00:00
parent 499b089076
commit caa1c435de

View File

@ -220,7 +220,7 @@ cpu_set_syscall_retval(struct thread *td, int error)
/* nothing to do */
break;
default:
frame->tf_r0 = error;
frame->tf_r0 = SV_ABI_ERRNO(td->td_proc, error);
frame->tf_spsr |= PSR_C; /* carry bit */
break;
}