All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: Laurent Vivier <laurent@vivier.eu>, Michael Forney <mforney@mforney.org>
Subject: [PULL 5/5] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation
Date: Tue, 19 Jan 2021 18:54:27 +0100	[thread overview]
Message-ID: <20210119175427.2050737-6-laurent@vivier.eu> (raw)
In-Reply-To: <20210119175427.2050737-1-laurent@vivier.eu>

From: Michael Forney <mforney@mforney.org>

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-L324
[1] https://github.com/mpe/linux-fullhistory/blob/v2.2.0/fs/locks.c#L429-L445

Signed-off-by: Michael Forney <mforney@mforney.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210114223602.9004-1-mforney@mforney.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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_fcntl.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
 
 #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
 
-#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); \
     }
 
 static int target_to_host_flock(int type)
-- 
2.29.2



  parent reply	other threads:[~2021-01-19 18:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 17:54 [PULL 0/5] Linux user for 6.0 patches Laurent Vivier
2021-01-19 17:54 ` [PULL 1/5] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls Laurent Vivier
2021-01-19 17:54 ` [PULL 2/5] linux-user: add missing UDP get/setsockopt option Laurent Vivier
2021-01-19 17:54 ` [PULL 3/5] linux-user: add missing IPv6 " Laurent Vivier
2021-01-20 12:16   ` Philippe Mathieu-Daudé
2021-01-20 16:00     ` Laurent Vivier
2021-01-20 16:12       ` Philippe Mathieu-Daudé
2021-01-20 16:22         ` Laurent Vivier
2021-01-20 16:56           ` Philippe Mathieu-Daudé
2021-01-20 17:15             ` Laurent Vivier
2021-01-19 17:54 ` [PULL 4/5] linux-user: Add IPv6 options to do_print_sockopt() Laurent Vivier
2021-01-19 17:54 ` Laurent Vivier [this message]
2021-01-20 14:23 ` [PULL 0/5] Linux user for 6.0 patches Peter Maydell
2021-01-20 19:53 Laurent Vivier
2021-01-20 19:53 ` [PULL 5/5] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation Laurent Vivier
2021-01-21 12:38 [PULL 0/5] Linux user for 6.0 patches Laurent Vivier
2021-01-21 12:38 ` [PULL 5/5] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210119175427.2050737-6-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=mforney@mforney.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.