sys_fcntl: remove F_FREESP and F_FREESP64 support
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 1 Mar 2014 21:17:17 +0000 (21:17 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 1 Mar 2014 21:17:17 +0000 (21:17 +0000)
F_FREESP and F_FREESP64 fcntl commands are not available in Linux
and therefore the code implementing their decoding is useless.
Besides that, F_FREESP64 decoding is too complicated to support.

* desc.c (fcntlcmds): Remove F_FREESP and F_FREESP64.
Remove F_FREESP64 from the check whether to define struct flock64.
(sys_fcntl): Remove F_FREESP and F_FREESP64 support.

desc.c

diff --git a/desc.c b/desc.c
index b2eabc21378eeb9491b08bee3eb24f14b4f73a26..d6d0e4780113497dc34595e0c1ade7c0682cbd78 100644 (file)
--- a/desc.c
+++ b/desc.c
@@ -109,9 +109,6 @@ static const struct xlat fcntlcmds[] = {
 #ifdef F_SETLKW
        XLAT(F_SETLKW),
 #endif
-#ifdef F_FREESP
-       XLAT(F_FREESP),
-#endif
 #ifdef F_GETLK
        XLAT(F_GETLK),
 #endif
@@ -121,9 +118,6 @@ static const struct xlat fcntlcmds[] = {
 #ifdef F_SETLKW64
        XLAT(F_SETLKW64),
 #endif
-#ifdef F_FREESP64
-       XLAT(F_FREESP64),
-#endif
 #ifdef F_GETLK64
        XLAT(F_GETLK64),
 #endif
@@ -238,8 +232,7 @@ static const struct xlat perf_event_open_flags[] = {
 # define HAVE_F_GETLK64 0
 #endif
 
-#if defined(X32) || defined(F_FREESP64) || \
-    HAVE_F_SETLK64 || HAVE_F_SETLKW64 || HAVE_F_GETLK64
+#if defined(X32) || HAVE_F_SETLK64 || HAVE_F_SETLKW64 || HAVE_F_GETLK64
 
 #ifndef HAVE_STRUCT_FLOCK64
 struct flock64 {
@@ -355,16 +348,10 @@ sys_fcntl(struct tcb *tcp)
                        tprint_open_modes(tcp->u_arg[2]);
                        break;
                case F_SETLK: case F_SETLKW:
-#ifdef F_FREESP
-               case F_FREESP:
-#endif
                        tprints(", ");
                        printflock(tcp, tcp->u_arg[2], 0);
                        break;
-#if defined(F_FREESP64) || HAVE_F_SETLK64 || HAVE_F_SETLKW64
-#ifdef F_FREESP64
-               case F_FREESP64:
-#endif
+#if HAVE_F_SETLK64 || HAVE_F_SETLKW64
                /* Linux glibc defines SETLK64 as SETLK,
                   even though the kernel has different values - as does Solaris. */
 #if HAVE_F_SETLK64
@@ -376,7 +363,7 @@ sys_fcntl(struct tcb *tcp)
                        tprints(", ");
                        printflock64(tcp, tcp->u_arg[2], 0);
                        break;
-#endif /* defined(F_FREESP64) || HAVE_F_SETLK64 || HAVE_F_SETLKW64 */
+#endif /* HAVE_F_SETLK64 || HAVE_F_SETLKW64 */
 #ifdef F_NOTIFY
                case F_NOTIFY:
                        tprints(", ");