summaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_file.c
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>1999-08-15 14:22:30 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>1999-08-15 14:22:30 +0000
commitdc6f939870fc3f203196905cb7045201270b8f45 (patch)
treed31508f98445d03cdbd89f70f4153aff8cf301f9 /sys/compat/linux/linux_file.c
parentac23fd20448f92bb7a5227a78ec76dc48e39a70f (diff)
Notes
Diffstat (limited to 'sys/compat/linux/linux_file.c')
-rw-r--r--sys/compat/linux/linux_file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index e3d411cf763b..a5b051fd1be9 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_file.c,v 1.29 1999/08/13 09:27:54 marcel Exp $
+ * $Id: linux_file.c,v 1.30 1999/08/14 18:20:44 marcel Exp $
*/
#include "opt_compat.h"
@@ -217,11 +217,11 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
p->p_pid, args->fd, args->cmd);
#endif
fcntl_args.fd = args->fd;
- fcntl_args.arg = 0;
switch (args->cmd) {
case LINUX_F_DUPFD:
fcntl_args.cmd = F_DUPFD;
+ fcntl_args.arg = args->arg;
return fcntl(p, &fcntl_args);
case LINUX_F_GETFD:
@@ -230,6 +230,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
case LINUX_F_SETFD:
fcntl_args.cmd = F_SETFD;
+ fcntl_args.arg = args->arg;
return fcntl(p, &fcntl_args);
case LINUX_F_GETFL:
@@ -247,6 +248,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
return error;
case LINUX_F_SETFL:
+ fcntl_args.arg = 0;
if (args->arg & LINUX_O_NDELAY) fcntl_args.arg |= O_NONBLOCK;
if (args->arg & LINUX_O_APPEND) fcntl_args.arg |= O_APPEND;
if (args->arg & LINUX_O_SYNC) fcntl_args.arg |= O_FSYNC;