From 0c025c7e6172128461f328142cbf3773f47bae86 Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 4 Oct 1998 16:19:50 +0000 Subject: [PATCH] fix fdup2 implementation; it passes the file descriptor itself, not a pointer to it in arg. --- sys/compat/svr4/svr4_fcntl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c index 67891bee9a59..b815828b30e7 100644 --- a/sys/compat/svr4/svr4_fcntl.c +++ b/sys/compat/svr4/svr4_fcntl.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_fcntl.c,v 1.28 1998/09/04 19:54:38 christos Exp $ */ +/* $NetBSD: svr4_fcntl.c,v 1.29 1998/10/04 16:19:50 christos Exp $ */ /*- * Copyright (c) 1994, 1997 The NetBSD Foundation, Inc. @@ -646,10 +646,7 @@ svr4_sys_fcntl(p, v, retval) struct sys_dup2_args du; SCARG(&du, from) = SCARG(uap, fd); - error = copyin(SCARG(uap, arg), - &SCARG(&du, to), sizeof SCARG(&du, to)); - if (error) - return error; + SCARG(&du, to) = (int)SCARG(uap, arg); error = sys_dup2(p, &du, retval); if (error) return error;