This patch implements the renameat() function and enhances
tst-rename.cc to unit test it.
This patch also exposes renameat as a syscall.
#Refs 1188
Signed-off-by: Waldemar Kozaczuk
---
exported_symbols/osv_ld-musl.so.1.symbols | 1 +
exported_symbols/osv_libc.so.6.symbols| 1 +
fs/vfs/ma
Signed-off-by: Waldemar Kozaczuk
---
Makefile| 1 +
libc/multibyte/__mbstowcs_chk.c | 17 +
2 files changed, 18 insertions(+)
create mode 100644 libc/multibyte/__mbstowcs_chk.c
diff --git a/Makefile b/Makefile
index 3e87a16d..19a4571b 100644
--- a/Makefi
V2: The only difference is removed delete_dir() function
was accidentally left from previous attempts to implement this
syscall.
It looks like the golang apps that need to iterate over entries
in a directory use a system call getdents64 which is documented
in https://man7.org/linux/man-pages/man2/
#Refs 1188
Signed-off-by: Waldemar Kozaczuk
---
linux.cc | 15 +++
tests/tst-syscall.cc | 7 +++
2 files changed, 22 insertions(+)
diff --git a/linux.cc b/linux.cc
index dd0dabd1..85c08981 100644
--- a/linux.cc
+++ b/linux.cc
@@ -366,6 +366,20 @@ static int sys_exit
V2: The implementation uses vfs_fun_at2() instead of vfs_fun_at()
to further simplify code. We also expose symlinkat though syscall.
This patch implements the symlinkat() function and enhances
tst-symlink.cc to unit test it.
#Refs 1188
Signed-off-by: Waldemar Kozaczuk
---
exported_symbols/osv_
V2: The implementation uses vfs_fun_at2() instead of vfs_fun_at()
to further simplify code. We also expose unlinkat though syscall.
This patch enhances the unlinkat() implementation to handle
the AT_FDCWD dirfd and AT_REMOVEDIR flags.
We also enhance tst-remove.cc to test unlinkat.
#Refs 1188
Comparing to the 1st version, this one adds another helper
function - vfs_fun_at2() - which calls supplied lambda if
dirfd == AT_FDCWD or pathname is an absolute path and otherwise
delegates to vfs_fun_at(). It also checks if pathname is not null.
The __fxstatat() and futimesat() call vfs_fun_at()