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: 69663 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp2522700qgf; Wed, 8 Jun 2016 07:21:02 -0700 (PDT) X-Received: by 10.55.99.216 with SMTP id x207mr4829682qkb.163.1465395662519; Wed, 08 Jun 2016 07:21:02 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f31si787137qkf.112.2016.06.08.07.21.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 08 Jun 2016 07:21:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAeLu-0008LN-2c for patch@linaro.org; Wed, 08 Jun 2016 10:21:02 -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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.1.4 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 */