Module Name: src
Committed By: pooka
Date: Mon Feb 21 23:30:13 UTC 2011
Modified Files:
src/sys/kern: makesyscalls.sh
Log Message:
S'no way bro!
Return the correct return value from NOERR, which is retval
instead of error.
To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/kern/makesyscalls.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.111 src/sys/kern/makesyscalls.sh:1.112
--- src/sys/kern/makesyscalls.sh:1.111 Mon Feb 21 23:20:19 2011
+++ src/sys/kern/makesyscalls.sh Mon Feb 21 23:30:12 2011
@@ -1,5 +1,5 @@
#! /bin/sh -
-# $NetBSD: makesyscalls.sh,v 1.111 2011/02/21 23:20:19 pooka Exp $
+# $NetBSD: makesyscalls.sh,v 1.112 2011/02/21 23:30:12 pooka Exp $
#
# Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
# All rights reserved.
@@ -778,7 +778,7 @@
printf("%s %s)\n", uncompattype(argtype[argc]), argname[argc]) \
> rumpcalls
printf("{\n\tregister_t rval[2] = {0, 0};\n") > rumpcalls
- if (returntype != "void")
+ if (returntype != "void" && type != "NOERR")
printf("\tint error = 0;\n") > rumpcalls
argarg = "NULL"
@@ -808,7 +808,7 @@
printf("\n") > rumpcalls
}
printf("\t") > rumpcalls
- if (returntype != "void")
+ if (returntype != "void" && type != "NOERR")
printf("error = ") > rumpcalls
printf("rsys_syscall(%s%s%s, " \
"%s, %s, rval);\n", constprefix, compatwrap_, funcalias, \
@@ -816,12 +816,9 @@
if (type != "NOERR") {
printf("\trsys_seterrno(error);\n") > rumpcalls
printf("\tif (error) {\n\t\trval[0] = -1;\n\t}\n") > rumpcalls
- rvariable = "rval[0]";
- } else {
- rvariable = "error";
}
if (returntype != "void") {
- printf("\treturn %s;\n", rvariable) > rumpcalls
+ printf("\treturn rval[0];\n") > rumpcalls
}
printf("}\n") > rumpcalls
printf("rsys_alias(%s%s,rump_enosys)\n", \