Michal Meloun
b443297793
bsd-user: Implement freebsd11 stat related syscalls
...
Rename the following syscalls to the freebsd11 variant:
do_freebsd_lstat -> do_freebsd11_lstat
do_freebsd_stat -> do_freebsd11_stat
Co-authored-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Michal Meloun <mmel@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Stacey Son
c0023204cb
bsd-user: Implement stat related syscalls
...
Implement the following syscalls:
fcntl(2)
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Stacey Son
213444529d
bsd-user: Implement getdents related syscalls
...
Implement the following syscalls:
getdents(2)
getdirecentries(2)
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Stacey Son
191fe50d5d
bsd-user: Implement statfs related syscalls
...
Implement the following syscalls:
statfs(2)
fstatfs(2)
getfsstat(2)
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Stacey Son
db8ee08f0a
bsd-user: Implement statfh related syscalls
...
Implement the following syscalls:
getfh(2)
lgetfh(2)
fhopen(2)
fhstat(2)
fhstatfs(2)
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Stacey Son
bf14f13d8b
bsd-user: Implement stat related syscalls
...
Implement the following syscalls:
stat(2)
lstat(2)
fstat(2)
fstatat(2)
nstat
nfstat
nlstat
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Michal Meloun
f9d5a35fbb
bsd-uesr: Implement h2t_freebsd_stat and h2t_freebsd_statfs functions
...
They are the 64-bit variants of h2t_freebsd11_stat and
h2t_freebsd11_statfs, respectively
Signed-off-by: Michal Meloun <mmel@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Stacey Son
584d6fce65
bsd-user: Implement target_to_host_fcntl_cmd
...
Implement the stat conversion functions:
target_to_host_fcntl_cmd
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Stacey Son
5aa88f962c
bsd-user: Implement h2t_freebds11_statfs
...
Implement the stat conversion functions:
h2t_freebds11_statfs
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Stacey Son
f2bc92aaf3
bsd-user: Implement h2t_freebsd_fhandle t2h_freebsd_fhandle
...
Implement the stat conversion functions:
h2t_freebsd_fhandle
t2h_freebsd_fhandle
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Stacey Son
86547e577b
bsd-user: Implement h2t_freebsd11_stat h2t_freebsd_nstat
...
Implement the stat conversion functions:
h2t_freebsd11_stat
h2t_freebsd_nstat
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Stacey Son
9b4a902d31
bsd-user: Declarations of h2t and t2h conversion functions.
...
Declarations of functions that convert between host and target structs.
Co-authored-by: Michal Meloun <mmel@FreeBSD.org >
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
2023-08-28 12:16:18 -06:00
Warner Losh
25e2cfbb8e
bsd-user: Move _WANT_FREEBSD macros to include/qemu/osdep.h
...
move _WANT_FREEBSD macros from bsd-user/freebsd/os-syscall.c to
include/qemu/osdep.h in order to pull some struct defintions needed
later in the build.
Signed-off-by: Warner Losh <imp@bsdimp.com >
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com >
Acked-by: Richard Henderson <richard.henderson@linaro.org >
2023-08-28 12:16:18 -06:00
Alex Bennée
2e2097b495
*-user: remove the guest_user_syscall tracepoints
...
This is pure duplication now. Both bsd-user and linux-user have
builtin strace support and we can also track syscalls via the plugins
system.
Reviewed-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-id: 20230526165401.574474-2-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-2-alex.bennee@linaro.org >
[Remove unused variable in do_freebsd_syscall() reported by Richard
Henderson.
--Stefan]
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2023-06-01 11:03:55 -04:00
Alex Bennée
c566080cd3
gdbstub: move syscall handling to new file
...
Our GDB syscall support is the last chunk of code that needs target
specific support so move it to a new file. We take the opportunity to
move the syscall state into its own singleton instance and add in a
few helpers for the main gdbstub to interact with the module.
I also moved the gdb_exit() declaration into syscalls.h as it feels
pretty related and most of the callers of it treat it as such.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20230302190846.2593720-22-alex.bennee@linaro.org >
Message-Id: <20230303025805.625589-22-richard.henderson@linaro.org >
2023-03-07 20:44:08 +00:00
Kyle Evans
6da777e212
bsd-user: implement sysctlbyname(2)
...
do_freebsd_sysctlbyname needs to translate the 'name' back down to a OID
so we can intercept the special ones. Do that and call the common wrapper
do_freebsd_sysctl_oid.
Signed-off-by: Kyle Evans <kevans@FreeBSD.org >
Reviewed-by: Warner Losh <imp@bsdimp.com >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2023-03-01 11:09:19 -07:00
Kyle Evans
7adda6de6d
bsd-user: do_freebsd_sysctl helper for sysctl(2)
...
Implement the wrapper function for sysctl(2). This puts the oid
arguments into a standard form and calls the common
do_freebsd_sysctl_oid.
Signed-off-by: Kyle Evans <kevans@FreeBSD.org >
Co-Authored-by: Juergen Lock <nox@jelal.kn-bremen.de >
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de >
Co-Authored-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Reviewed-by: Warner Losh <imp@bsdimp.com >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2023-03-01 11:09:19 -07:00
Juergen Lock
248a485bf6
bsd-user: Start translation of arch-specific sysctls
...
Intercept some syscalls that we need to translate (like the archiecture
we're running on) and translate them. These are only the simplest ones
so far.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de >
Co-Authored-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Co-Authored-by: Warner Losh <imp@bsdimp.com >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2023-03-01 11:09:19 -07:00
Juergen Lock
dd7a627ac7
bsd-user: common routine do_freebsd_sysctl_oid for all sysctl variants
...
do_freebsd_sysctl_oid filters out some of the binary and special sysctls
where host != target. None of the sysctls that have to be translated from
host to target are handled here.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de >
Co-Authored-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Co-Authored-by: Warner Losh <imp@bsdimp.com >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2023-03-01 11:09:18 -07:00
Juergen Lock
0394968a44
bsd-user: sysctl helper funtions: sysctl_name2oid and sysctl_oidfmt
...
Helper functions for sysctl implementations. sysctl_name2oid and
sysctl_oidfmt convert oids between host and targets
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de >
Reviewed-by: Warner Losh <imp@bsdimp.com >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2023-03-01 11:09:18 -07:00
Stacey Son
efba70de54
bsd-user: Helper routines oidfmt
...
oidfmt uses undocumented system call to get the type of the sysctl.
Co-Authored-by: Sean Bruno <sbruno@FreeBSD.org >
Signed-off-by: Sean Bruno <sbruno@FreeBSD.org >
Co-Authored-by: Juergen Lock <nox@jelal.kn-bremen.de >
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de >
Co-Authored-by: Raphael Kubo da Costa <rakuco@FreeBSD.org >
Signed-off-by: Raphael Kubo da Costa <rakuco@FreeBSD.org >
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Reviewed-by: Warner Losh <imp@bsdimp.com >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Acked-by: Richard Henderson <richard.henderson@linaro.org >
2023-03-01 11:09:18 -07:00
Warner Losh
0867507857
bsd-user: various helper routines for sysctl
...
cap_memory - Caps the memory to just below MAXINT
scale_to_guest_pages - Account for difference in host / guest page size
h2g_long_sat - converts a int64_t to a int32_t, saturating at max / min values
h2g_ulong_sat - converts a uint64_t to a uint32_t, saturating at max value
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2023-03-01 11:09:18 -07:00
Stacey Son
fb96f5dfed
bsd-user: Add sysarch syscall
...
Connect up the sysarch system call.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de >
Co-authored-by: Juergen Lock <nox@jelal.kn-bremen.de >
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Reviewed-by: Warner Losh <imp@bsdimp.com >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2023-03-01 11:09:18 -07:00
Doug Rabson
4cf41e8084
bsd-user: Don't truncate the return value from freebsd_syscall
...
System call return values on FreeBSD are in a register (which is spelled
abi_long in qemu). This was being assigned into an int variable which
causes problems for 64bit targets.
Resolves: https://github.com/qemu-bsd-user/qemu-bsd-user/issues/40
Signed-off-by: Doug Rabson <dfr@rabson.org >
Reviewed-by: Warner Losh <imp@bsdimp.com >
[ Edited commit message for upstreaming into qemu-project ]
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2023-03-01 11:09:18 -07:00
Markus Armbruster
48e438a3aa
bsd-user: Clean up includes
...
This commit was created with scripts/clean-includes.
All .c should include qemu/osdep.h first. The script performs three
related cleanups:
* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c already includes
it. Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
Drop these, too.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Message-Id: <20230202133830.2152150-6-armbru@redhat.com >
2023-02-08 07:16:23 +01:00
Warner Losh
952d5d30d6
bsd-user: Implement undelete
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-07-02 07:52:48 -06:00
Warner Losh
d3f29ddacd
bsd-user: Implement pathconf, lpathconf and fpathconf
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-07-02 07:52:48 -06:00
Warner Losh
5fbd8011ff
bsd-user: Implement mkfifo and mkfifoat
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-07-02 07:52:48 -06:00
Warner Losh
17a4d13cea
bsd-user: Implement chroot and flock
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-07-02 07:52:48 -06:00
Warner Losh
c6f0a7d91a
bsd-user: Implement chflags, lchflags and fchflags
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-07-02 07:52:48 -06:00
Warner Losh
58af3e295c
bsd-user: Implement chown, fchown, lchown and fchownat
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-07-02 07:52:48 -06:00
Warner Losh
79cfae0c1b
bsd-user: Implement freebsd11_mknod, freebsd11_mknodat and mknodat
...
These implement both the old-pre INO64 mknod variations, as well as the
now current INO64 variant. Make direct syscall calls for these older
syscalls to avloid too many dependencies.
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Michal Meloun <mmel@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-07-02 07:52:48 -06:00
Warner Losh
0db0db8f23
bsd-user: implement chmod, fchmod, lchmod and fchmodat
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-07-02 07:52:48 -06:00
Warner Losh
c7b62b4a87
bsd-user: Implement symlink, symlinkat, readlink and readlinkat
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-07-02 07:52:42 -06:00
Warner Losh
af2ae2e8ac
bsd-user: Implement mount, umount and nmount
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-07-02 07:51:03 -06:00
Warner Losh
d35020ed00
bsd-user: Implement acct and sync
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-14 08:17:44 -06:00
Warner Losh
4b795b147b
bsd-user: Implement trunctate and ftruncate
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-14 08:17:44 -06:00
Warner Losh
a15699acaf
bsd-user: Implement dup and dup2
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-14 08:17:44 -06:00
Warner Losh
6af8f76a9f
bsd-user: Implement rmdir and undocumented __getcwd
...
Implemenet rmdir and __getcwd. __getcwd is the undocumented
back end to getcwd(3).
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-14 08:17:37 -06:00
Warner Losh
1ffbd5e7fe
bsd-user: Implement mkdir and mkdirat
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-14 08:17:31 -06:00
Warner Losh
2d3b7e01d6
bsd-user: Implement link, linkat, unlink and unlinkat
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-13 15:51:29 -06:00
Warner Losh
ab5fd2d969
bsd-user: Implement rename and renameat
...
Plus the helper LOCK_PATH2 and UNLOCK_PATH2 macros.
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-13 15:50:50 -06:00
Warner Losh
390f547ea8
bsd-user: Implement chdir and fchdir
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-13 15:50:22 -06:00
Warner Losh
65c6c4c893
bsd-user: Implement revoke, access, eaccess and faccessat
...
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-13 15:49:39 -06:00
Warner Losh
a2ba6c7b80
bsd-user: Implement fdatasync, fsync and close_from
...
Implement fdatasync(2), fsync(2) and close_from(2).
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-13 15:48:59 -06:00
Warner Losh
77d3522b3f
bsd-user: Implement open, openat and close
...
Add the open, openat and close system calls. We need to lock paths, so
implmenent that as well.
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org >
Signed-off-by: Kyle Evans <kevans@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-13 15:48:09 -06:00
Warner Losh
9554d33076
bsd-user/freebsd/os-syscall.c: Implement exit
...
Implement the exit system call. Bring in bsd-proc.h to contain all the
process system call implementation and helper routines.
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Kyle Evans <kevans@FreeBSD.org >
2022-06-10 22:03:50 -06:00
Warner Losh
770d8abae7
bsd-user/bsd-file.h: Meat of the write system calls
...
Implement write, writev, pwrite and pwritev and connect them to the
system call dispatch routine.
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Kyle Evans <kevans@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-10 22:00:48 -06:00
Warner Losh
80da1b0088
bsd-user/bsd-file.h: Add implementations for read, pread, readv and preadv
...
Implement do_bsd_{read,pread,readv,preadv}. Connect them to the system
call table.
Signed-off-by: Stacey Son <sson@FreeBSD.org >
Signed-off-by: Kyle Evans <kevans@FreeBSD.org >
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-10 22:00:48 -06:00
Warner Losh
db69788703
bsd-user/freebsd/os-syscall.c: Tracing and error boilerplate
...
Add in the tracing and this system call not implemented boilerplate. Do
this by moving the guts of do_freebsd_syscall to freebsd_syscall. Put
the tracing in the wrapper function. Since freebsd_syscall is a
singleton static function, it will almost certainly be inlined. Fix
comments that referred to do_syscall since that was renamed some tie
ago.
Signed-off-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-10 22:00:48 -06:00