[PATCH 3/7] tools/nolibc: remove __nolibc_enosys() fallback from dup2()

Thomas Weißschuh posted 7 patches 1 month, 1 week ago
[PATCH 3/7] tools/nolibc: remove __nolibc_enosys() fallback from dup2()
Posted by Thomas Weißschuh 1 month, 1 week ago
All architectures have one of the real functions available.
The additional fallback to __nolibc_enosys() is superfluous.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 tools/include/nolibc/sys.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index 2b9c3bf697e74e80016606814fe21929512ca007..9c4fa7efc1d606f18a5a92b0a3dd9ad7b9b4521b 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -235,10 +235,8 @@ int sys_dup2(int old, int new)
 {
 #if defined(__NR_dup3)
 	return my_syscall3(__NR_dup3, old, new, 0);
-#elif defined(__NR_dup2)
-	return my_syscall2(__NR_dup2, old, new);
 #else
-	return __nolibc_enosys(__func__, old, new);
+	return my_syscall2(__NR_dup2, old, new);
 #endif
 }
 

-- 
2.50.1