Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 Fix pipe2 return value.
details: https://anonhg.NetBSD.org/src/rev/46e20dcce173
branches: trunk
changeset: 771233:46e20dcce173
user: njoly <njoly%NetBSD.org@localhost>
date: Tue Nov 15 14:13:17 2011 +0000
description:
Fix pipe2 return value.
diffstat:
sys/compat/netbsd32/netbsd32_netbsd.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (39 lines):
diff -r 7ce03c363a13 -r 46e20dcce173 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c Tue Nov 15 13:51:23 2011 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c Tue Nov 15 14:13:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_netbsd.c,v 1.174 2011/11/08 10:59:12 njoly Exp $ */
+/* $NetBSD: netbsd32_netbsd.c,v 1.175 2011/11/15 14:13:17 njoly Exp $ */
/*
* Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.174 2011/11/08 10:59:12 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.175 2011/11/15 14:13:17 njoly Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -2579,12 +2579,18 @@
int fd[2], error;
error = pipe1(l, retval, SCARG(uap, flags));
- if (error)
+ if (error != 0)
return error;
fd[0] = retval[0];
fd[1] = retval[1];
- return copyout(fd, SCARG_P32(uap, fildes), sizeof(fd));
+
+ error = copyout(fd, SCARG_P32(uap, fildes), sizeof(fd));
+ if (error != 0)
+ return error;
+
+ retval[0] = 0;
+ return 0;
}
int
Home |
Main Index |
Thread Index |
Old Index