PERFORCE change 134136 for review

Robert Watson rwatson at FreeBSD.org
Sat Jan 26 04:07:38 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=134136

Change 134136 by rwatson at rwatson_freebsd_capabilities on 2008/01/26 12:07:36

	Move capenabled logic a bit higher in parseline() so that it also
	catches system calls with (void) arguments.

Affected files ...

.. //depot/projects/trustedbsd/capabilities/src/sys/kern/makesyscalls.sh#3 edit

Differences ...

==== //depot/projects/trustedbsd/capabilities/src/sys/kern/makesyscalls.sh#3 (text+ko) ====

@@ -267,6 +267,20 @@
 		f++	#function return type
 
 		funcname=$f
+
+		#
+		# We now know the func name, so define a flags field for it.
+		# Do this before any other processing as we may return early
+		# from it.
+		#
+		# XXXRW: Surely we can just look it up in the array in awk?
+		#
+		for (cap in capenabled) {
+			if (funcname == capenabled[cap]) {
+				flags = "SYF_CAPENABLED";
+			}
+		}
+
 		if (funcalias == "")
 			funcalias = funcname
 		if (argalias == "") {
@@ -308,17 +322,6 @@
 		}
 		if (argc != 0)
 			argssize = "AS(" argalias ")"
-
-		#
-		# We now know the func name, so define a flags field for it.
-		#
-		# XXXRW: Surely we can just look it up in the array in awk?
-		#
-		for (cap in capenabled) {
-			if (funcname == capenabled[cap]) {
-				flags = "SYF_CAPENABLED";
-			}
-		}
 	}
 	{	comment = $4
 		if (NF < 7)


More information about the p4-projects mailing list