Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Fix arg64 computation for compat_netbsd32



details:   https://anonhg.NetBSD.org/src/rev/a42b09e4dfe3
branches:  trunk
changeset: 348607:a42b09e4dfe3
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 28 23:44:32 2016 +0000

description:
Fix arg64 computation for compat_netbsd32

diffstat:

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

diffs (40 lines):

diff -r da3794a3da22 -r a42b09e4dfe3 sys/kern/makesyscalls.sh
--- a/sys/kern/makesyscalls.sh  Fri Oct 28 20:38:12 2016 +0000
+++ b/sys/kern/makesyscalls.sh  Fri Oct 28 23:44:32 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: makesyscalls.sh,v 1.164 2016/01/26 23:46:37 pooka Exp $
+#      $NetBSD: makesyscalls.sh,v 1.165 2016/10/28 23:44:32 christos Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -470,6 +470,11 @@
        print
        exit 1
 }
+function isarg64(type) {
+       gsub("netbsd32_", "", type);
+       return type == "quad_t" || type == "off_t" \
+           || type == "dev_t" ||  type == "time_t";
+}
 function parserr(was, wanted) {
        printf "%s: line %d: unexpected %s (expected <%s>)\n", \
            infile, NR, was, wanted
@@ -573,7 +578,7 @@
        } else {
                funcname=fprefix "_" fbase
        }
-       if (returntype == "quad_t" || returntype == "off_t") {
+       if (isarg64(returntype)) {
                if (sycall_flags == "0")
                        sycall_flags = "SYCALL_RET_64";
                else
@@ -646,8 +651,7 @@
                } else {
                        argalign++;
                }
-               if (argtype[argc] == "quad_t" || argtype[argc] == "off_t" \
-                 || argtype[argc] == "dev_t" || argtype[argc] == "time_t") {
+               if (isarg64(argtype[argc])) {
                        if (sycall_flags == "0")
                                sycall_flags = "SYCALL_ARG"argc-1"_64";
                        else



Home | Main Index | Thread Index | Old Index