From patchwork Thu Feb 16 14:22:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 728704 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vPJWc4c2xz9s8T for ; Fri, 17 Feb 2017 01:31:56 +1100 (AEDT) Received: from localhost ([::1]:47021 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceN6A-0003KP-3t for incoming@patchwork.ozlabs.org; Thu, 16 Feb 2017 09:31:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceMxV-0002gV-7g for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:22:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceMxU-0002Py-B3 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:22:57 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:51913) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceMxU-0002Oe-03 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:22:56 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0Lto9d-1cCUGK3SZJ-011EXV; Thu, 16 Feb 2017 15:22:34 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:22:17 +0100 Message-Id: <20170216142227.27448-5-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216142227.27448-1-laurent@vivier.eu> References: <20170216142227.27448-1-laurent@vivier.eu> X-Provags-ID: V03:K0:f1QQU/TTptppxGVT1U6BeRk4OvWxFuhts64U/BCB/fsYyp+9iZ3 LeVE16ZBNOzDM9kcQ8RIf9yykByml1dGrtbabD81sGhRUIqt72qUJycfyCb83eWHPsbpcGk vqMxqjnF9NsWQPg6YQNvc/EcOR320lv/u/RzoGXbwCgoCK8yKYtXppgU7/CH2WvoZkyXZT5 rAsY2hkLhKI+l+Us1ZtuA== X-UI-Out-Filterresults: notjunk:1; V01:K0:KKzvkgp4peA=:C/k/6Eg77soLLww0+QtJtm aAmj6xDgfnpOWSwjhmeUB57/dD24KsXTzt1iYJF+iVRJOpZ3x+zYdLGmnlnHVuStmGLSe3RuX 4fFtpw98FWsmvYFmz8+ueWL/odBeGPBvjOgRFPOBA7tbwti4n+wFhviL167qQfOjLqOZfpLja OdbCPwEA0qQyGCG3eoFp1+/MJAiBEQ9OSu4YEa3iBqsp8SSE1+CO31ZuFuZebhSaGbyiUsiEl W/nsI41oWu9i2IyxsD31U1aM8EHY9+rtZwOxBG3HkKZ4if92NlTa3SePiCVjz/m/Kj/6+9Jjs 6KMfOqh3grQLBfqN3f41pjsiTUdhuWzfWeGY9yxBPgRbTGDRggy6U612ULYb0RbhT9ROLwi2s p80q3Qgd/NLDGGTvzgJ9McjvKYXounVeXCJWz5hqZFfx3OleNN7OH2kH1zQTE3T9spe6qxndC 8NPnjviuj0e/YpX6LUWxDfjKfZ1s1zCCKOLfC4bVs2Tc3feqQvpHIu2jNiRjP+gH4jAvtUe+R sHfMHhPnVl1qDUAiOtwT7HqcYreR8spLZvs4O2qNl+wCH0+Glj5uT9o92IrUNNDEWTFbyXH4n J/oVZNiN0cM9XODB7iB4aeKjPvEuQGZgP116IWKF0EkjooHmxstJ+ps4KLUinaWy+X/WmU9gU pCxhzGRuIZmbOKfClZhAGJ550+MSudUBYeZiubxOwdKKRym9NJI9LLnfeQ73pMAVhsk8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.75 Subject: [Qemu-devel] [PULL 04/14] linux-user: Fix inotify_init1 support 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: Lena Djokic , Riku Voipio , Riku Voipio Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Lena Djokic This commit adds necessary conversion of argument passed to inotify_init1. inotify_init1 flags can be IN_NONBLOCK and IN_CLOEXEC which rely on O_NONBLOCK and O_CLOEXEC and those can have different values on different platforms. Signed-off-by: Lena Djokic Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9be8e95..fccd631 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11561,7 +11561,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, #ifdef CONFIG_INOTIFY1 #if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1) case TARGET_NR_inotify_init1: - ret = get_errno(sys_inotify_init1(arg1)); + ret = get_errno(sys_inotify_init1(target_to_host_bitmask(arg1, + fcntl_flags_tbl))); break; #endif #endif