]> granicus.if.org Git - strace/commitdiff
fcntl.c: make use of RVAL_DECODED
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 9 Oct 2015 01:55:46 +0000 (01:55 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 9 Oct 2015 02:18:27 +0000 (02:18 +0000)
* fcntl.c (SYS_FUNC(fcntl)): Return RVAL_DECODED for write-only operations.

fcntl.c

diff --git a/fcntl.c b/fcntl.c
index e7a4030f4ddcd0f6049be04d0ad6f10920a5d691..3cf984bc6c2aa3056cae7ca20d31884fd449563d 100644 (file)
--- a/fcntl.c
+++ b/fcntl.c
@@ -170,23 +170,14 @@ SYS_FUNC(fcntl)
                        printxval(lockfcmds, tcp->u_arg[2], "F_???");
                        break;
 #endif
+               case F_GETOWN:
+                       break;
+               default:
+                       return 0;
                }
+               return RVAL_DECODED;
        } else {
                switch (tcp->u_arg[1]) {
-               case F_DUPFD:
-#ifdef F_DUPFD_CLOEXEC
-               case F_DUPFD_CLOEXEC:
-#endif
-               case F_SETFD: case F_SETFL:
-               case F_SETLK: case F_SETLKW:
-               case F_SETOWN: case F_GETOWN:
-#ifdef F_NOTIFY
-               case F_NOTIFY:
-#endif
-#ifdef F_SETLEASE
-               case F_SETLEASE:
-#endif
-                       break;
                case F_GETFD:
                        if (syserror(tcp) || tcp->u_rval == 0)
                                return 0;