svn commit: r339624 - head/sys/kern

Brooks Davis brooks at FreeBSD.org
Mon Oct 22 22:13:01 UTC 2018


Author: brooks
Date: Mon Oct 22 22:13:00 2018
New Revision: 339624
URL: https://svnweb.freebsd.org/changeset/base/339624

Log:
  Remove the need for backslashes in syscalls.master.
  
  Join non-special lines together until we hit a line containing a '}'
  character. This allows the function declaration body to be split
  across multiple lines without backslash continuation characters.
  
  Continue to join lines ending with backslashes to allow gradual
  migration and to support out-of-tree syscall vectors
  
  Reviewed by:	emaste, kib
  Obtained from:	CheriBSD
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D17488

Modified:
  head/sys/kern/makesyscalls.sh

Modified: head/sys/kern/makesyscalls.sh
==============================================================================
--- head/sys/kern/makesyscalls.sh	Mon Oct 22 21:51:59 2018	(r339623)
+++ head/sys/kern/makesyscalls.sh	Mon Oct 22 22:13:00 2018	(r339624)
@@ -68,13 +68,33 @@ if [ -n "$2" ]; then
 fi
 
 sed -e '
-:join
+	# FreeBSD ID, includes, comments, and blank lines
+	/.*\$FreeBSD/b done_joining
+	/^[#;]/b done_joining
+	/^$/b done_joining
+
+	# Join lines ending in backslash
+:joining
 	/\\$/{a\
 
 	N
 	s/\\\n//
-	b join
+	b joining
 	}
+
+	# OBSOL, etc lines without function signatures
+	/^[0-9][^{]*$/b done_joining
+
+	# Join incomplete signatures.  The { must appear on the first line
+	# and the } must appear on the last line (modulo lines joined by
+	# backslashes).
+	/^[^}]*$/{a\
+
+	N
+	s/\n//
+	b joining
+	}
+:done_joining
 2,${
 	/^#/!s/\([{}()*,]\)/ \1 /g
 }


More information about the svn-src-head mailing list