From patchwork Thu Aug 13 20:06:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [07/11] linux-user: enable getdents for > 32-bit systems Date: Thu, 13 Aug 2009 10:06:20 -0000 From: Riku Voipio X-Patchwork-Id: 31364 Message-Id: To: qemu-devel@nongnu.org Cc: Riku Voipio From: Ulrich Hecht works perfectly fine with the example from getdents(2) and passes the LTP tests (tested with s390x on x86_64 emulation) Signed-off-by: Ulrich Hecht Signed-off-by: Riku Voipio --- linux-user/syscall.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 02fa987..0f5d8da 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -193,9 +193,7 @@ static int gettid(void) { return -ENOSYS; } #endif -#if TARGET_ABI_BITS == 32 _syscall3(int, sys_getdents, uint, fd, struct linux_dirent *, dirp, uint, count); -#endif #if defined(TARGET_NR_getdents64) && defined(__NR_getdents64) _syscall3(int, sys_getdents64, uint, fd, struct linux_dirent64 *, dirp, uint, count); #endif @@ -5792,9 +5790,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, break; #endif case TARGET_NR_getdents: -#if TARGET_ABI_BITS != 32 - goto unimplemented; -#elif TARGET_ABI_BITS == 32 && HOST_LONG_BITS == 64 +#if TARGET_ABI_BITS == 32 && HOST_LONG_BITS == 64 { struct target_dirent *target_dirp; struct linux_dirent *dirp;