diff options
author | Warner Losh | 2022-06-12 16:16:46 +0200 |
---|---|---|
committer | Warner Losh | 2022-06-13 23:50:50 +0200 |
commit | ab5fd2d969855be6a0355e55d21b51c676f7b1b6 (patch) | |
tree | ab9c2b264bf7ba8e818823b52188fc36c69b0e3d /bsd-user/freebsd | |
parent | bsd-user: Implement chdir and fchdir (diff) | |
download | qemu-ab5fd2d969855be6a0355e55d21b51c676f7b1b6.tar.gz qemu-ab5fd2d969855be6a0355e55d21b51c676f7b1b6.tar.xz qemu-ab5fd2d969855be6a0355e55d21b51c676f7b1b6.zip |
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>
Diffstat (limited to 'bsd-user/freebsd')
-rw-r--r-- | bsd-user/freebsd/os-syscall.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index 8698db358c..2d62a54632 100644 --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -309,6 +309,14 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, ret = do_bsd_fchdir(arg1); break; + case TARGET_FREEBSD_NR_rename: /* rename(2) */ + ret = do_bsd_rename(arg1, arg2); + break; + + case TARGET_FREEBSD_NR_renameat: /* renameat(2) */ + ret = do_bsd_renameat(arg1, arg2, arg3, arg4); + break; + default: qemu_log_mask(LOG_UNIMP, "Unsupported syscall: %d\n", num); ret = -TARGET_ENOSYS; |