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
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
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
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
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
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
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
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
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
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
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
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
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
9c0928045c
Clean up ill-advised or unusual header guards
...
Leading underscores are ill-advised because such identifiers are
reserved. Trailing underscores are merely ugly. Strip both.
Our header guards commonly end in _H. Normalize the exceptions.
Macros should be ALL_CAPS. Normalize the exception.
Done with scripts/clean-header-guards.pl.
include/hw/xen/interface/ and tools/virtiofsd/ left alone, because
these were imported from Xen and libfuse respectively.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20220506134911.2856099-3-armbru@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-05-11 16:50:01 +02:00
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