From patchwork Mon Dec 5 23:11:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 5491 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B149C23E19 for ; Mon, 5 Dec 2011 23:11:56 +0000 (UTC) Received: from mail-lpp01m010-f52.google.com (mail-lpp01m010-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id 86CDDA182A8 for ; Mon, 5 Dec 2011 23:11:56 +0000 (UTC) Received: by lagm6 with SMTP id m6so625194lag.11 for ; Mon, 05 Dec 2011 15:11:56 -0800 (PST) Received: by 10.152.144.73 with SMTP id sk9mr7344828lab.34.1323126716149; Mon, 05 Dec 2011 15:11:56 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.41.198 with SMTP id h6cs289491lal; Mon, 5 Dec 2011 15:11:55 -0800 (PST) Received: by 10.14.11.23 with SMTP id 23mr1529397eew.242.1323126713426; Mon, 05 Dec 2011 15:11:53 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id x5si8111832eeb.105.2011.12.05.15.11.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Dec 2011 15:11:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RXhhO-0000ab-0j; Mon, 05 Dec 2011 23:11:50 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Riku Voipio , qemu-trivial@nongnu.org Subject: [PATCH] linux-user/syscall.c: Don't skip stracing for fcntl64 failure case Date: Mon, 5 Dec 2011 23:11:50 +0000 Message-Id: <1323126710-2242-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In an fcntl64 failure path, we were returning directly rather than simply breaking out of the switch statement. This skips the strace code for printing the syscall return value, so don't do that. Signed-off-by: Peter Maydell Acked-by: Alexander Graf --- Alex Graf spotted this one... linux-user/syscall.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f227097..4846b41 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7521,8 +7521,10 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, #endif cmd = target_to_host_fcntl_cmd(arg2); - if (cmd == -TARGET_EINVAL) - return cmd; + if (cmd == -TARGET_EINVAL) { + ret = cmd; + break; + } switch(arg2) { case TARGET_F_GETLK64: