]> git.proxmox.com Git - wasi-libc.git/blobdiff - libc-bottom-half/cloudlibc/src/libc/unistd/faccessat.c
Delete several blocks of unused code. (#294)
[wasi-libc.git] / libc-bottom-half / cloudlibc / src / libc / unistd / faccessat.c
index 2ccecb8abecb664ae4a96dd33f695087f8bf60a9..d28805d18f759816b64e7b7fa9a36a53ce8651b3 100644 (file)
@@ -2,15 +2,13 @@
 //
 // SPDX-License-Identifier: BSD-2-Clause
 
-#include <common/errno.h>
-
 #include <wasi/api.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <string.h>
 #include <unistd.h>
 
-int faccessat(int fd, const char *path, int amode, int flag) {
+int __wasilibc_nocwd_faccessat(int fd, const char *path, int amode, int flag) {
   // Validate function parameters.
   if ((amode & ~(F_OK | R_OK | W_OK | X_OK)) != 0 ||
       (flag & ~AT_EACCESS) != 0) {
@@ -22,9 +20,8 @@ int faccessat(int fd, const char *path, int amode, int flag) {
   __wasi_lookupflags_t lookup_flags = __WASI_LOOKUPFLAGS_SYMLINK_FOLLOW;
   __wasi_filestat_t file;
   __wasi_errno_t error =
-      __wasi_path_filestat_get(fd, lookup_flags, path, strlen(path), &file);
+      __wasi_path_filestat_get(fd, lookup_flags, path, &file);
   if (error != 0) {
-    errno = errno_fixup_directory(fd, error);
     return -1;
   }