Module Name:    src
Committed By:   pooka
Date:           Tue Feb 22 10:33:12 UTC 2011

Modified Files:
        src/sys/kern: makesyscalls.sh

Log Message:
Use the whole contents of rval instead of just rval[0] for rump
syscall return.  Fixes at least lseek() on various architectures
in various ways.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 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.112 src/sys/kern/makesyscalls.sh:1.113
--- src/sys/kern/makesyscalls.sh:1.112	Mon Feb 21 23:30:12 2011
+++ src/sys/kern/makesyscalls.sh	Tue Feb 22 10:33:12 2011
@@ -1,5 +1,5 @@
 #! /bin/sh -
-#	$NetBSD: makesyscalls.sh,v 1.112 2011/02/21 23:30:12 pooka Exp $
+#	$NetBSD: makesyscalls.sh,v 1.113 2011/02/22 10:33:12 pooka Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -815,10 +815,12 @@
 	    argarg, argsize) > rumpcalls
 	if (type != "NOERR") {
 		printf("\trsys_seterrno(error);\n") > rumpcalls
-		printf("\tif (error) {\n\t\trval[0] = -1;\n\t}\n") > rumpcalls
+		printf("\tif (error) {\n") > rumpcalls
+		printf("\t\t*(%s *)rval = (%s)-1;\n\t}\n", \
+		    returntype, returntype) > rumpcalls
 	}
 	if (returntype != "void") {
-		printf("\treturn rval[0];\n") > rumpcalls
+		printf("\treturn *(%s *)rval;\n", returntype) > rumpcalls
 	}
 	printf("}\n") > rumpcalls
 	printf("rsys_alias(%s%s,rump_enosys)\n", \

Reply via email to