SHA256
1
0
forked from pool/qemu
qemu/0028-linux-user-enable-getdents-for-32-bit-systems.patch
OBS User autobuild ae572d8970 Accepting request 1038 from GNOME:Factory
Copy from IBS home:uli_suse:branches:SUSE:Factory:Head/qemu based on submit request 1038 from user uli_suse

OBS-URL: https://build.opensuse.org/request/show/1038
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qemu?expand=0&rev=31
2009-08-11 15:37:13 +00:00

42 lines
1.3 KiB
Diff

From cd19670096c6f7affdba9792cb695b851390c184 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Thu, 23 Jul 2009 17:17:32 +0200
Subject: [PATCH 28/33] linux-user: enable getdents for > 32-bit systems
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 <uli@suse.de>
---
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 86754f1..49dfb40 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -195,9 +195,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
@@ -5820,9 +5818,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;
--
1.6.2.1