From patchwork Fri Mar 27 09:49:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 184998 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp1097957ilr; Fri, 27 Mar 2020 02:51:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv9z1V3UdsYnDMjNYGwIPfXJ4wp8HUtYlehP6eSptvvqr+2UoV21Pvp9/kv6bRWLqqfkK8l X-Received: by 2002:ac8:38cc:: with SMTP id g12mr13339869qtc.186.1585302704130; Fri, 27 Mar 2020 02:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585302704; cv=none; d=google.com; s=arc-20160816; b=fj29FPjBpj4F0dtvl7P0dWxeGDDYkUUi6Bg5t/KLFZ9GPJGClvYHEtBnA8Wvd9k1k+ n3zFHVg6MBeVlMzW+r+rlIWwCmYZwQHPna0xskj3Et8lWFAdnGlmMPr5U4vWctSEcK3T kUAMSTZA/0Y0ZsB/jmq4h/9Q+FGVhVpwF78Fv+HH6jUfZ2zfdcHbYm0g8UjdmFDuRt+A D4kgwiXdmSF3eVx+YR7cNMlzk4wfoPSj2veZb8E3JR9AVtz4gBHrgVPN7bNu0PGwDlt1 wGJZGnIcRE8Qvn/JJ8d3CTffWXxTdBDsAtJjc/XEFP8hbzOj4S2EqIKOQ5xakT2RuYJQ pQNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=UvjQIXOYDmX/EoTXnR+r4XSFKQrLP267MXe/Bc4WNPw=; b=fNuCpIFUjIcYWQkBo/ymbUyhvmUwGCH9KlmjHbhRowf8/EzomT5XL0v3GITDxmnxKu ag4m1PB7k5UbIJRdqup+/ce/4KOl9buD+Dz4SPaJqpma8I+HzYyBYNnRGVGPdKqFiwYc KBNJiYOtOkUPOEiOirPaGBmPaoN0+fxsVAll0XeajV8eiSMlbIwCKkhJ8czkOfHe+ZT/ fKnXSXQjqPCcmAincCHMMMs85TijejTkwYxiV+fFVL5YxNqDYWumL3alIknn447bFdaa qjb36FIUL7GFCsvt6IuAHVjeOHouajfxCC0qzX1iqESEeUJSRgegUl7M2mxj6LcwYaPj a6eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YumT0yhK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r20si2951749qvh.184.2020.03.27.02.51.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Mar 2020 02:51:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YumT0yhK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHleR-0006ti-Ko for patch@linaro.org; Fri, 27 Mar 2020 05:51:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37771) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHlcc-0003LD-I2 for qemu-devel@nongnu.org; Fri, 27 Mar 2020 05:49:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHlcb-0003do-A1 for qemu-devel@nongnu.org; Fri, 27 Mar 2020 05:49:50 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:46507) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHlca-0003Xv-Vo for qemu-devel@nongnu.org; Fri, 27 Mar 2020 05:49:49 -0400 Received: by mail-wr1-x441.google.com with SMTP id j17so10544549wru.13 for ; Fri, 27 Mar 2020 02:49:48 -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 :mime-version:content-transfer-encoding; bh=UvjQIXOYDmX/EoTXnR+r4XSFKQrLP267MXe/Bc4WNPw=; b=YumT0yhKzv9AigpJ/m+kwl7j+CxbLGRmOx2luHxqdwL1f88CPIFa4Df5AxGvK8dRQQ KWeANL3vPWc5trJQeuwUpmIAgeftnX/V72XcX3kwAuytuUsu5WQEayFoovTiWme+drXx 6LTw2ijnk7fsw9fgNTxvOPnTJGzGRvC59aPPEUfpTA+s/DBiUTWFPZinzPnoyENuZTm8 MWEajZHfaKibu3xZzSn3mDNdks8WmIywA5Uq0Q+ckaMQVUE6qgD9FOwHwRIXEgagL+Bb tcBtBS93mN4WfxqycBgtNLIAcH7d3iN8odFGcj5rfXL5ggiw34SKuJ0ZKyJLksaJt5SJ w2lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UvjQIXOYDmX/EoTXnR+r4XSFKQrLP267MXe/Bc4WNPw=; b=L6HmDyGI3R0tfUSVTs73OqoY0Qc8eLcrAg2EbAiYGDuG0KxnqA3L+6AEB8cfTpmgk6 fy0bFi5w526mGcxXz/0pPDOE5A9CveoGUExqR1qIlP2yuEH7BUZJqgVMVWq2x9WIx0UW KcM305AUh6l0mrw0zBNq2kJVHZCnC6YFnxdgRz87Ius6Xz4UgLn7XA97GR98b/ee9O7T QjqjXGn+ok4pPIBxsBzzttuYL9zQsIHd6S/PJOrxCMMWxs4hw0p48xg0BJ2qAZ1uDWJ6 K2RKkyXmTLC7o9YD0Ngvee8Vay5ESdzzMWu19nJMPaDmQSMZLLYtnXB0JX5SOsOtzmks 0Ppg== X-Gm-Message-State: ANhLgQ1tKlsnmO7IlWYaNgB+gTeidjOhu90gKhcP4kR1Tt7aFSHK4LQS ddBBbLehj0tezLYruw8qKurytw== X-Received: by 2002:adf:e946:: with SMTP id m6mr14582541wrn.187.1585302587304; Fri, 27 Mar 2020 02:49:47 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w204sm7521430wma.1.2020.03.27.02.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 02:49:46 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 910461FF8C; Fri, 27 Mar 2020 09:49:45 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 2/7] linux-user: protect fcntl64 with an #ifdef Date: Fri, 27 Mar 2020 09:49:40 +0000 Message-Id: <20200327094945.23768-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200327094945.23768-1-alex.bennee@linaro.org> References: <20200327094945.23768-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Checking TARGET_ABI_BITS is sketchy - we should check for the presence of the define to be sure. Also clean up the white space while we are there. Signed-off-by: Alex Bennée --- linux-user/syscall.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.20.1 Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 49395dcea97..a3da46d69f9 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11223,11 +11223,11 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, This is a hint, so ignoring and returning success is ok. */ return 0; #endif -#if TARGET_ABI_BITS == 32 +#ifdef TARGET_NR_fcntl64 case TARGET_NR_fcntl64: { - int cmd; - struct flock64 fl; + int cmd; + struct flock64 fl; from_flock64_fn *copyfrom = copy_from_user_flock64; to_flock64_fn *copyto = copy_to_user_flock64; @@ -11238,7 +11238,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } #endif - cmd = target_to_host_fcntl_cmd(arg2); + cmd = target_to_host_fcntl_cmd(arg2); if (cmd == -TARGET_EINVAL) { return cmd; }