fcntl.c: make use of RVAL_DECODED

* fcntl.c (SYS_FUNC(fcntl)): Return RVAL_DECODED for write-only operations.
This commit is contained in:
Дмитрий Левин 2015-10-09 01:55:46 +00:00
parent 2512003cea
commit c3410ba543

19
fcntl.c
View File

@ -170,23 +170,14 @@ SYS_FUNC(fcntl)
printxval(lockfcmds, tcp->u_arg[2], "F_???"); printxval(lockfcmds, tcp->u_arg[2], "F_???");
break; break;
#endif #endif
case F_GETOWN:
break;
default:
return 0;
} }
return RVAL_DECODED;
} else { } else {
switch (tcp->u_arg[1]) { 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: case F_GETFD:
if (syserror(tcp) || tcp->u_rval == 0) if (syserror(tcp) || tcp->u_rval == 0)
return 0; return 0;