From patchwork Wed Jun 8 13:30:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 9164831 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B4B18604DB for ; Wed, 8 Jun 2016 14:19:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF39426B4A for ; Wed, 8 Jun 2016 14:19:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3EB528047; Wed, 8 Jun 2016 14:19:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FSL_HELO_HOME, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 36FC126B4A for ; Wed, 8 Jun 2016 14:19:19 +0000 (UTC) Received: from localhost ([::1]:57275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAeKE-0007Eh-BB for patchwork-qemu-devel@patchwork.kernel.org; Wed, 08 Jun 2016 10:19:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAdZa-0004UQ-Md for qemu-devel@nongnu.org; Wed, 08 Jun 2016 09:31:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAdZV-0005ou-4r for qemu-devel@nongnu.org; Wed, 08 Jun 2016 09:31:06 -0400 Received: from mail-lf0-x22d.google.com ([2a00:1450:4010:c07::22d]:35657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAdZU-0005oe-TH for qemu-devel@nongnu.org; Wed, 08 Jun 2016 09:31:01 -0400 Received: by mail-lf0-x22d.google.com with SMTP id u74so5853941lff.2 for ; Wed, 08 Jun 2016 06:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lwpQ7qmOpXrT3A1ix4lcj7svjMhI2G15lHX38xn9PNE=; b=C9IHllMcugPsM8ibHpwnBtUpgzTpoMX/e6rlyod3E7lIYuuBXtkdt8/HUwVtgXTCpk ikqKc0zGzFfdpoBTW90PgJXwzjgBLOEXjWddHXLa42DK9T8N0/ob1wFBeey+Tc4RjHne 2RUxH8x5lUzM3PnjqrAb7RQs0fzHR/x3dAAAY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lwpQ7qmOpXrT3A1ix4lcj7svjMhI2G15lHX38xn9PNE=; b=lCtO/6cXGkjj+zbOipKWOoKJqXvph2YtpyRo3uGPbr9iwaum5oyvA58WnbqYojp1Uh ZuzxAzzQuxvkuKlLwIi9M5C6ewZ3izGqXydqoGg8OQ5+effJu2T0ciFBQtR78cPWIyiM sya5Bs6pQMquVo95mMPmP1cSSalJXcFTl5VICMrsM+nrFNrexfNGIVBapyMhZLivZ91n NFfJSGw+m9DujSZ1FK/BN4UnA2K28hCSC7zjtnVRBnWBcYLxZpRlR77z1NfQeYhfg4Yp ELBxMPS/ZCIJyUtLXAZ/g/Ev1llcU5zekG8J92IjWOXlonfxa16YrDnzTd3MQpPOhGtb 9fnQ== X-Gm-Message-State: ALyK8tKHJ7FxXo5M0nxO1nszyIcfdOzh00ZxvAwBK6vYnIagwQWveR4vAuuqQ/QrWmcKr4qr X-Received: by 10.25.142.16 with SMTP id q16mr3732585lfd.53.1465392660213; Wed, 08 Jun 2016 06:31:00 -0700 (PDT) Received: from beaming.home (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id 2sm139854lja.37.2016.06.08.06.30.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jun 2016 06:30:59 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 8 Jun 2016 16:30:08 +0300 Message-Id: <977d8241c10de4160a9377efd496395c98b7dee9.1465392531.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22d Subject: [Qemu-devel] [PULL 27/44] linux-user: Fix error conversion in 64-bit fadvise syscall X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Peter Maydell Fix a missing host-to-target errno conversion in the 64-bit fadvise syscall emulation. Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5cff9f7..8f8d9db 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -10035,8 +10035,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, default: break; } #endif - ret = -posix_fadvise(arg1, arg2, arg3, arg4); - break; + ret = -host_to_target_errno(posix_fadvise(arg1, arg2, arg3, arg4)); + break; #endif #endif /* end of 64-bit ABI fadvise handling */