Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Use the whole contents of rval instead of just rval...



details:   https://anonhg.NetBSD.org/src/rev/42ee5b61674a
branches:  trunk
changeset: 762510:42ee5b61674a
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Feb 22 10:33:12 2011 +0000

description:
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.

diffstat:

 sys/kern/makesyscalls.sh |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r 01961ba427ae -r 42ee5b61674a sys/kern/makesyscalls.sh
--- a/sys/kern/makesyscalls.sh  Tue Feb 22 09:39:48 2011 +0000
+++ b/sys/kern/makesyscalls.sh  Tue Feb 22 10:33:12 2011 +0000
@@ -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", \



Home | Main Index | Thread Index | Old Index