From nobody Tue Nov 18 15:27:37 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1611081276; cv=none; d=zohomail.com; s=zohoarc; b=l0L+CG3FiWDXDuI+miozjNTmO3tzMZ91LkA6vsDCCnbO2zfIv8vR0mApzbt0MpIe9BVwtCWMPaBqxqdD2rscvV8VOW/klIF+ubLWAUMEeYI0O8d1Xz6q8brT7homNSsVP9Qwc4zZTUVY0lRATi09v43M7wM6x7PFYisLvVo+wxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611081276; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sd1QlZYeXla40umuTYPBrxba4rge5KcfuPmLrMtm3H4=; b=JKLZPoiei6MzdRvYxPw9VjAYsg35zJScjYNZqtdlF55cSmos0LFomJe33C4lgX/oL6vr+uO8H1hd6LmCCXN/pnkMwweOM8jJkYN76aPbB8emEu+XnRrr1/vIV1+CY+KgnKPK6FJA5bzXQ4XESG6ZO6dfSeBpNJatfXZCNH20UNc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611081276675836.7464153563569; Tue, 19 Jan 2021 10:34:36 -0800 (PST) Received: from localhost ([::1]:59522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1vpr-0001i1-JV for importer@patchew.org; Tue, 19 Jan 2021 13:34:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1vDE-00029i-48 for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:54:40 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:55179) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1vD9-00041d-Ro for qemu-devel@nongnu.org; Tue, 19 Jan 2021 12:54:39 -0500 Received: from localhost.localdomain ([82.252.149.54]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M5fdC-1l7wod1WRO-007HB2; Tue, 19 Jan 2021 18:54:33 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 5/5] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation Date: Tue, 19 Jan 2021 18:54:27 +0100 Message-Id: <20210119175427.2050737-6-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210119175427.2050737-1-laurent@vivier.eu> References: <20210119175427.2050737-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:fumJ+ZWoY5AtkIg385dIrUQEzDcuIlFq9fy6UAfNCw29lpcL5O7 p9w0lwg0EFiHa7UY0HkSfcPhnY6Q5bwB2q9MGQ26ggTTJTNyIsEs/nDQlEjxGPNkC5oo59R C/AMRdodhNgUy6qcu7QFjAX3Qn8TrrF6QdYVOo15yAxohY2oFI2Epi+ohm8bDXDvMwKM2RG koJP8X3yPMc3qeWcV/qOQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:xQ5K6p3YTgU=:0htVeI1VEVhgy4zgVIq/cz pdbLw0lc5LtwTKSE4EDgODWavvZ3e+6Uf6sZ+MhgoKRjg6+cgVnZ5qJ78etcGsxWVhuRX6lg1 ZslQp4xzNriuiQmTbH5wTosrvpkHl+EPD5npwyGDr1ghssOjWv7c2xyCmwlnjP5LaERd1Diqq qVqqMV3gSTsXgT4lA8FRoUE7ccS80FpQZSlmSMqRCfxbJQyCV7ne5b9qbQ80Bk59dzydPq2mE O4FzAbPd+OKfQ3sfLD/n6x7geq1FR2Ypxoeguauyj3KAmHCny/JOam5RZpnC3GuGwYFZAZejb uZnFfKNBbXh0PymnkBJBp6nNiHPxTwafca7RMz1+mtARwQhdoAD3ROOr0i2XIudeSsVHlgVIb pNdhYpSgtJ956TFVGV1nO4uZMn6HT7HNrJ7JbIIsLyFsIYTripBMly1i/heShEuF4K2QlXGlc 9soR3wc7Lg== Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=212.227.126.134; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Laurent Vivier , Michael Forney Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Michael Forney These lock types are unsupported by Linux since v2.2[0][1] and always return EINVAL (except on SPARC up until v2.6, which just warned). musl libc does not define these constants, so just remove them from the translation cases. [0] https://github.com/mpe/linux-fullhistory/blob/v2.2.0/fs/locks.c#L322-L3= 24 [1] https://github.com/mpe/linux-fullhistory/blob/v2.2.0/fs/locks.c#L429-L4= 45 Signed-off-by: Michael Forney Reviewed-by: Laurent Vivier Message-Id: <20210114223602.9004-1-mforney@mforney.org> Signed-off-by: Laurent Vivier --- linux-user/alpha/target_fcntl.h | 2 -- linux-user/generic/fcntl.h | 5 ----- linux-user/syscall.c | 2 -- 3 files changed, 9 deletions(-) diff --git a/linux-user/alpha/target_fcntl.h b/linux-user/alpha/target_fcnt= l.h index 2617e73472b7..e16ed1d4157f 100644 --- a/linux-user/alpha/target_fcntl.h +++ b/linux-user/alpha/target_fcntl.h @@ -33,8 +33,6 @@ #define TARGET_F_RDLCK 1 #define TARGET_F_WRLCK 2 #define TARGET_F_UNLCK 8 -#define TARGET_F_EXLCK 16 -#define TARGET_F_SHLCK 32 =20 #include "../generic/fcntl.h" #endif diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h index c85c5b9fed65..4568d1f42bdd 100644 --- a/linux-user/generic/fcntl.h +++ b/linux-user/generic/fcntl.h @@ -119,11 +119,6 @@ struct target_f_owner_ex { #define TARGET_F_UNLCK 2 #endif =20 -#ifndef TARGET_F_EXLCK -#define TARGET_F_EXLCK 4 -#define TARGET_F_SHLCK 8 -#endif - #ifndef TARGET_HAVE_ARCH_STRUCT_FLOCK #ifndef TARGET_ARCH_FLOCK_PAD #define TARGET_ARCH_FLOCK_PAD diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 70c61d15ebf8..1f91aa0ed5e3 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6678,8 +6678,6 @@ static int target_to_host_fcntl_cmd(int cmd) TRANSTBL_CONVERT(F_RDLCK); \ TRANSTBL_CONVERT(F_WRLCK); \ TRANSTBL_CONVERT(F_UNLCK); \ - TRANSTBL_CONVERT(F_EXLCK); \ - TRANSTBL_CONVERT(F_SHLCK); \ } =20 static int target_to_host_flock(int type) --=20 2.29.2