Message ID | 20200728123432.501354-4-laurent@vivier.eu |
---|---|
State | New |
Headers | show |
Series | [PULL,1/3] linux-user: Ensure mmap_min_addr is non-zero | expand |
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index c1ebf7b8f384..945fc252791c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -388,14 +388,7 @@ static bitmask_transtbl fcntl_flags_tbl[] = { { 0, 0, 0, 0 } }; -static int sys_getcwd1(char *buf, size_t size) -{ - if (getcwd(buf, size) == NULL) { - /* getcwd() sets errno */ - return (-1); - } - return strlen(buf)+1; -} +_syscall2(int, sys_getcwd1, char *, buf, size_t, size) #ifdef TARGET_NR_utimensat #if defined(__NR_utimensat)