From ace0646608c393d8952b14536090c302bed2ee85 Mon Sep 17 00:00:00 2001 From: Miguel Date: Fri, 21 Sep 2018 01:43:25 +0200 Subject: piperei working finally :) --- userspace/newcalls.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'userspace/newcalls.h') diff --git a/userspace/newcalls.h b/userspace/newcalls.h index 9bc55a5..4568711 100644 --- a/userspace/newcalls.h +++ b/userspace/newcalls.h @@ -3,6 +3,7 @@ // this syscall will be moved to newlib later! #define SYSCALL_CLONE 83 #define SYSCALL_PIPE 84 +#define SYSCALL_DUP2 86 int _clone(void) { @@ -12,4 +13,8 @@ int _pipe(uint32_t fds[2]) { return syscall(SYSCALL_PIPE,fds,0,0); } +int _dup2(uint32_t oldfd,uint32_t newfd) +{ + return syscall(SYSCALL_DUP2,oldfd,newfd,0); +} // -- cgit v1.2.3