Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Make sure we don't expose any errno set as a side-e...
details: https://anonhg.NetBSD.org/src/rev/53929cc20d2a
branches: trunk
changeset: 762461:53929cc20d2a
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Feb 21 11:29:53 2011 +0000
description:
Make sure we don't expose any errno set as a side-effect of us
executing the system call. Some software ignores the return value
and looks only at errno.
diffstat:
sys/kern/makesyscalls.sh | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (25 lines):
diff -r 99e49f8e2b14 -r 53929cc20d2a sys/kern/makesyscalls.sh
--- a/sys/kern/makesyscalls.sh Mon Feb 21 11:16:47 2011 +0000
+++ b/sys/kern/makesyscalls.sh Mon Feb 21 11:29:53 2011 +0000
@@ -1,5 +1,5 @@
#! /bin/sh -
-# $NetBSD: makesyscalls.sh,v 1.109 2011/01/17 16:16:54 pooka Exp $
+# $NetBSD: makesyscalls.sh,v 1.110 2011/02/21 11:29:53 pooka Exp $
#
# Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
# All rights reserved.
@@ -808,12 +808,10 @@
printf("\terror = rsys_syscall(%s%s%s, " \
"%s, %s, rval);\n", constprefix, compatwrap_, funcalias, \
argarg, argsize) > rumpcalls
- printf("\tif (error) {\n\t\trval[0] = -1;\n") > rumpcalls
+ printf("\trsys_seterrno(error);\n") > rumpcalls
+ printf("\tif (error) {\n\t\trval[0] = -1;\n\t}\n") > rumpcalls
if (returntype != "void") {
- printf("\t\trsys_seterrno(error);\n\t}\n") > rumpcalls
printf("\treturn rval[0];\n") > rumpcalls
- } else {
- printf("\t}\n") > rumpcalls
}
printf("}\n") > rumpcalls
printf("rsys_alias(%s%s,rump_enosys)\n", \
Home |
Main Index |
Thread Index |
Old Index