From nobody Sat May 18 15:49:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=1603856617; cv=none; d=zohomail.com; s=zohoarc; b=mN80ivcxDVjQTdueeMxr/x79bV7s10Y+jGVTsZniHahIau0I6qdcluaBnHAr+U9pROOAlz2T0h+c9yf0gqtHa53AW4aX6BCqXewz8X3EeAYc9NIidyeyiD9278UzQgyYnQ3pDEyaR1nu/f8rK7DCbI53LKzDLobw5gfFzWu3ApY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603856617; h=Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=SMLQMh29gPUsiwUvg4LfzpyksxkYmWIU1fC0NjpFTe4=; b=FCT35g+THkL+u/SKDa2TovpnsItxg0iQg5xPtIsbnW7yIc54wMeAfge0Icu6Eezl0Ta3YYW0nESNTz51kaKa3uJHdP9fIZX8VgAVxI898ulr+yWHA3sNzDXYO+oDUwT/pr/VkxmUUY4x+B2TSyLqsVZUh9dXDtbE09HpvRltQu8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1603856617862394.9000692742936; Tue, 27 Oct 2020 20:43:37 -0700 (PDT) Received: from localhost ([::1]:56886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXcN6-0003AC-K3 for importer@patchew.org; Tue, 27 Oct 2020 23:43:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXc9S-0008FO-8y for qemu-devel@nongnu.org; Tue, 27 Oct 2020 23:29:33 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:41300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXc9O-0006Pz-PO for qemu-devel@nongnu.org; Tue, 27 Oct 2020 23:29:29 -0400 Received: by mail-pg1-x542.google.com with SMTP id g12so1954875pgm.8 for ; Tue, 27 Oct 2020 20:29:23 -0700 (PDT) Received: from localhost ([2601:647:5180:4570:16dd:a9ff:fee7:6b79]) by smtp.gmail.com with ESMTPSA id e1sm3997078pfd.198.2020.10.27.20.29.21 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 27 Oct 2020 20:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=SMLQMh29gPUsiwUvg4LfzpyksxkYmWIU1fC0NjpFTe4=; b=KfFrE6dLwIdcQwE8bWeUqe9kqlLn6D8iY1icoIs/xza74f44pz9NGWJ0+jHLknsxQx DguTkoUv2gfbb6/Q9wlPEAkXwv6/hv1COVDxr2k/K9Qk7qBqksy8FtpGWVDLgjP5MSa7 5L/1iQq9/QMOZFHf/qz0PqUeXRwsj6Ro0wH4dg2PZ+046N7Ty+pj2n5zN625VqW4IQ7a CRTTfpioCSldwc6LzAWt6Ex1If6bO/CYZkxtnuPE1vrV5YC5zMxUPR8vqN3qI7zjlZil 0wP9rUX86c8MQdeaN33F/lcNnLTzWInJBMJoAolnL6Lg9Yo4gSe2CUSUnhXrQh3kEfHR N7TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=SMLQMh29gPUsiwUvg4LfzpyksxkYmWIU1fC0NjpFTe4=; b=OmhykNUP5ytQdowrGM2Xv/syPUdriCg9j0MenU3W2nZaF0S6/1uQQuNAh/6+oOalZC moZ3jhYkw4HzQBpwq7Xep9zyuoPLLtlDsUcLvDFRICzD5HwHKnILzmubI/611O+qYWAo sJ669U2L23bwewOo5obLHc5mNFMzOSGp7/u5XVB6Px8L1FaTf7/BioiWlc5LGO5bUUZd lShdIdiHPr8j12OHpcwv6A/EfVOnQBiBQ+wgw6HojnPK+Iw4pjBlXGEoazzJaPEsWlLU QPevvHMlSfHsT3JvAX7d+KB3nRdwtN7ZkO4IpNJ/x0+xI3C0TriiK6RtbBSa99SXuWo0 lz1g== X-Gm-Message-State: AOAM531DRjH0kyBHhbnMIfe5HuGEITu1/9+29dfTXqUfXmD7TP0G6ISM f5ys3KqCuPrOoRzYFws3QRsVioNYNKL6ENfGTeA= X-Google-Smtp-Source: ABdhPJwMHNSCeOKdVrN7MyRz0SAmcRHg3LpJWwx94JPKsmWt0XwPNJkPI6RgrDbtqlBwfqccqMPbAA== X-Received: by 2002:aa7:91c8:0:b029:155:c7c1:3fae with SMTP id z8-20020aa791c80000b0290155c7c13faemr5347269pfa.74.1603855762512; Tue, 27 Oct 2020 20:29:22 -0700 (PDT) From: Michael Forney To: qemu-devel@nongnu.org Subject: [PATCH] linux-user: Remove obsolete F_SHLCK and F_WRLCK translation Date: Tue, 27 Oct 2020 20:27:27 -0700 Message-Id: <20201028032727.31326-1-mforney@mforney.org> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::542; envelope-from=mforney@mforney.org; helo=mail-pg1-x542.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @mforney-org.20150623.gappssmtp.com) Content-Type: text/plain; charset="utf-8" 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 --- 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 2617e73472..e16ed1d415 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 c85c5b9fed..4568d1f42b 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 897d20c076..56a8380dda 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6621,8 +6621,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.0