Commit Graph

4 Commits

Author SHA1 Message Date
Marc-André Lureau 0f9668e0c1 Remove qemu-common.h include from most units
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220323155743.1585078-33-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-04-06 14:31:55 +02:00
Warner Losh c5c84d1651 bsd-user/bsd-file.h: Implementation details for the filesystem calls
An include file that pulls in all the definitions needed for the file
related system calls. This also includes the host definitions to
implement the system calls and some helper routines to lock/unlock
different aspects of the system call arguments.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2022-02-26 21:05:18 -07:00
Warner Losh deeff83b47 bsd-user/freebsd/os-syscall.c: Add get_errno and host_to_target_errno
Add the helper functions get_errno and host_to_target_errno. get_errno
returns either the system call results, or the -errno when system call
indicates failure by returning -1. Host_to_target_errno returns errno
(since on FreeBSD they are the same on all architectures) along with a
comment about why it's the identity.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2022-02-26 10:01:38 -07:00
Warner Losh 66eed099f4 bsd-user/freebsd/os-syscall.c: Move syscall processing here
While there is some commonality between *BSD syscall processing, there's
a number of differences and the system call numbers and ABIs have been
independent since the late 90s. Move FreeBSD's proessing here and delete
it.

The upstream implementation is somewhat different than the current
implementation. It will be much easier to upstream these from scratch,
justifying the final result, rather than working out the diffs and
justifying the changes. Also tweak a comment to qemu standard form.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2022-02-26 10:01:38 -07:00