Skip to content

Commit fbd4f52

Browse files
kragnizt-8ch
authored andcommitted
tools/nolibc: always use openat(2) instead of open(2)
All architectures support openat, so we don't need to make its use conditional. Signed-off-by: Louis Taylor <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Thomas Weißschuh <[email protected]>
1 parent b2edaad commit fbd4f52

File tree

1 file changed

+0
-6
lines changed
  • tools/include/nolibc

1 file changed

+0
-6
lines changed

tools/include/nolibc/sys.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -798,13 +798,7 @@ int openat(int dirfd, const char *path, int flags, ...)
798798
static __attribute__((unused))
799799
int sys_open(const char *path, int flags, mode_t mode)
800800
{
801-
#ifdef __NR_openat
802801
return my_syscall4(__NR_openat, AT_FDCWD, path, flags, mode);
803-
#elif defined(__NR_open)
804-
return my_syscall3(__NR_open, path, flags, mode);
805-
#else
806-
return __nolibc_enosys(__func__, path, flags, mode);
807-
#endif
808802
}
809803

810804
static __attribute__((unused))

0 commit comments

Comments
 (0)