Module Name:    src
Committed By:   kamil
Date:           Tue Jun  2 16:45:42 UTC 2020

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

Log Message:
Respect syscall aliases in the rump code

With this change rump_sys_*() matches *() from the usually libc entry point.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 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.177 src/sys/kern/makesyscalls.sh:1.178
--- src/sys/kern/makesyscalls.sh:1.177	Tue Jun  2 13:49:15 2020
+++ src/sys/kern/makesyscalls.sh	Tue Jun  2 16:45:42 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: makesyscalls.sh,v 1.177 2020/06/02 13:49:15 kamil Exp $
+#	$NetBSD: makesyscalls.sh,v 1.178 2020/06/02 16:45:42 kamil Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -600,10 +600,12 @@ function parseline() {
 		funcalias=funcname
 		sub(/^([^_]+_)*sys_/, "", funcalias)
 		realname=fbase
+		rumpfname=realname "" fcompat
 	} else {
 		realname=funcalias
+		rumpfname=realname
 	}
-	rumpfname=realname "" fcompat
+
 	f++
 
 	if ($f != "(")
@@ -713,8 +715,8 @@ function printproto(wrap) {
 
 	# accumulate fbases we have seen.  we want the last
 	# occurence for the default __RENAME()
-	seen = funcseen[fbase]
-	funcseen[fbase] = rumpfname
+	seen = funcseen[realname]
+	funcseen[realname] = rumpfname
 	# special case for mknod as type of last argument changed from
 	# uint32_t to dev_t
 	if ((seen && fbase != "mknod") || (!seen && fbase == "mknod"))
@@ -731,7 +733,7 @@ function printproto(wrap) {
 	else
 		printf("%s)", uncompattype(argtype[argc])) > rumpprotos
 
-	printf(" __RENAME(RUMP_SYS_RENAME_%s)", toupper(fbase))> rumpprotos
+	printf(" __RENAME(RUMP_SYS_RENAME_%s)", toupper(realname))> rumpprotos
 	printf(";\n") > rumpprotos
 
 	# generate forward-declares for types, apart from the

Reply via email to