Source-Changes-HG archive

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

[src/trunk]: src/sys/kern For varargs syscalls, create rump prototypes which ...



details:   https://anonhg.NetBSD.org/src/rev/4f8346cacb77
branches:  trunk
changeset: 748104:4f8346cacb77
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Oct 13 21:54:29 2009 +0000

description:
For varargs syscalls, create rump prototypes which match the regular
system call counterparts, e.g.:
open(const char *, int, mode_t) -> open(const char *, int, ...)

diffstat:

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

diffs (26 lines):

diff -r 3646c67179a0 -r 4f8346cacb77 sys/kern/makesyscalls.sh
--- a/sys/kern/makesyscalls.sh  Tue Oct 13 21:39:55 2009 +0000
+++ b/sys/kern/makesyscalls.sh  Tue Oct 13 21:54:29 2009 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh -
-#      $NetBSD: makesyscalls.sh,v 1.87 2009/05/15 15:51:27 pooka Exp $
+#      $NetBSD: makesyscalls.sh,v 1.88 2009/10/13 21:54:29 pooka Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -521,10 +521,13 @@
                return
 
        printf("%s rump_%s(", returntype, funcstdname) > rumpcallshdr
-       for (i = 1; i < argc; i++)
+       for (i = 1; i < varargc; i++)
                if (argname[i] != "PAD")
                        printf("%s, ", argtype[i]) > rumpcallshdr
-       printf("%s)", argtype[argc]) > rumpcallshdr
+       if (isvarargs)
+               printf("%s, ...)", argtype[varargc]) > rumpcallshdr
+       else
+               printf("%s)", argtype[argc]) > rumpcallshdr
        if (wantrename)
                printf(" __RENAME(rump_%s)", funcname) > rumpcallshdr
        printf(";\n") > rumpcallshdr



Home | Main Index | Thread Index | Old Index