]> git.proxmox.com Git - wasi-libc.git/blobdiff - libc-bottom-half/cloudlibc/src/libc/sys/stat/utimensat.c
Delete several blocks of unused code. (#294)
[wasi-libc.git] / libc-bottom-half / cloudlibc / src / libc / sys / stat / utimensat.c
index 67f3adf5548c71f5df6f2026a0ad7b0a14f49992..d274ef5ce2f40a3ceb6f068ef891d771283eed99 100644 (file)
@@ -2,8 +2,6 @@
 //
 // SPDX-License-Identifier: BSD-2-Clause
 
-#include <common/errno.h>
-
 #include <sys/stat.h>
 
 #include <wasi/api.h>
@@ -20,7 +18,6 @@ int __wasilibc_nocwd_utimensat(int fd, const char *path, const struct timespec t
   __wasi_timestamp_t st_mtim;
   __wasi_fstflags_t flags;
   if (!utimens_get_timestamps(times, &st_atim, &st_mtim, &flags)) {
-    errno = EINVAL;
     return -1;
   }
 
@@ -31,9 +28,8 @@ int __wasilibc_nocwd_utimensat(int fd, const char *path, const struct timespec t
 
   // Perform system call.
   __wasi_errno_t error =
-      __wasi_path_filestat_set_times(fd, lookup_flags, path, strlen(path), st_atim, st_mtim, flags);
+      __wasi_path_filestat_set_times(fd, lookup_flags, path, st_atim, st_mtim, flags);
   if (error != 0) {
-    errno = errno_fixup_directory(fd, error);
     return -1;
   }
   return 0;