From patchwork Thu Aug 13 20:06:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 31364 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 94525B7063 for ; Fri, 14 Aug 2009 06:23:46 +1000 (EST) Received: from localhost ([127.0.0.1]:51084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mbgpr-0004Yj-C7 for incoming@patchwork.ozlabs.org; Thu, 13 Aug 2009 16:23:43 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbgZJ-0003zC-89 for qemu-devel@nongnu.org; Thu, 13 Aug 2009 16:06:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbgZF-0003u3-8W for qemu-devel@nongnu.org; Thu, 13 Aug 2009 16:06:33 -0400 Received: from [199.232.76.173] (port=50655 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbgZF-0003tm-33 for qemu-devel@nongnu.org; Thu, 13 Aug 2009 16:06:33 -0400 Received: from [84.20.150.76] (port=34714 helo=naru.obs2.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbgZE-0000qP-5N for qemu-devel@nongnu.org; Thu, 13 Aug 2009 16:06:32 -0400 Received: from kos.to (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by narury.org (Postfix) with ESMTP id 521EE327406E; Thu, 13 Aug 2009 23:06:26 +0300 (EEST) Received: by kos.to (Postfix, from userid 573) id E8712EE8321; Thu, 13 Aug 2009 23:06:25 +0300 (EEST) From: riku.voipio@iki.fi To: qemu-devel@nongnu.org Date: Thu, 13 Aug 2009 23:06:20 +0300 Message-Id: X-Mailer: git-send-email 1.6.2.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 Cc: Riku Voipio Subject: [Qemu-devel] [PATCH 07/11] linux-user: enable getdents for > 32-bit systems X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;