From owner-svn-src-stable-10@freebsd.org Thu May 11 04:29:22 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11699D6812E; Thu, 11 May 2017 04:29:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6D9BCD1; Thu, 11 May 2017 04:29:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B4TKdU025424; Thu, 11 May 2017 04:29:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B4TKeu025423; Thu, 11 May 2017 04:29:20 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705110429.v4B4TKeu025423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 11 May 2017 04:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318172 - in stable: 10/sys/kern 11/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 04:29:22 -0000 Author: jhb Date: Thu May 11 04:29:20 2017 New Revision: 318172 URL: https://svnweb.freebsd.org/changeset/base/318172 Log: MFC 313999: Consolidate statements to initialize files. Previously, the first lines of various generated files from system call tables were generated in two sections. Some of the initialization was done in BEGIN, and the rest was done when the first line was encountered. The main reason for this split before r313564 was that most of the initialization done in the second section depended on the $FreeBSD$ tag extracted from the system call table. Now that the $FreeBSD$ tag is no longer used, consolidate all of the file initialization in the BEGIN section. This change was tested by confirming that the content of generated files did not change. Modified: stable/10/sys/kern/makesyscalls.sh Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/kern/makesyscalls.sh Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/kern/makesyscalls.sh ============================================================================== --- stable/10/sys/kern/makesyscalls.sh Thu May 11 03:47:58 2017 (r318171) +++ stable/10/sys/kern/makesyscalls.sh Thu May 11 04:29:20 2017 (r318172) @@ -110,6 +110,9 @@ sed -e ' split(capenabled_string, capenabled, ","); + printf "\n/* The casts are bogus but will do for now. */\n" > sysent + printf "struct sysent %s[] = {\n",switchname > sysent + printf "/*\n * System call switch table.\n *\n" > syssw printf " * DO NOT EDIT-- this file is automatically generated.\n" > syssw printf " * $%s$\n", "FreeBSD" > syssw @@ -119,34 +122,6 @@ sed -e ' printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysarg printf " * $%s$\n", "FreeBSD" > sysarg printf " */\n\n" > sysarg - - printf "\n#ifdef %s\n\n", compat > syscompat - printf "\n#ifdef %s\n\n", compat4 > syscompat4 - printf "\n#ifdef %s\n\n", compat6 > syscompat6 - printf "\n#ifdef %s\n\n", compat7 > syscompat7 - - printf "/*\n * System call names.\n *\n" > sysnames - printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames - printf " * $%s$\n", "FreeBSD" > sysnames - printf " */\n\n" > sysnames - - printf "/*\n * System call numbers.\n *\n" > syshdr - printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr - printf " * $%s$\n", "FreeBSD" > syshdr - printf " */\n\n" > syshdr - - printf "# FreeBSD system call object files.\n" > sysmk - printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk - printf "# $%s$\n", "FreeBSD" > sysmk - - printf "/*\n * System call argument to DTrace register array converstion.\n *\n" > systrace - printf " * DO NOT EDIT-- this file is automatically generated.\n" > systrace - printf " * $%s$\n", "FreeBSD" > systrace - } - NR == 1 { - printf "\n/* The casts are bogus but will do for now. */\n" > sysent - printf "struct sysent %s[] = {\n",switchname > sysent - printf "#ifndef %s\n", sysproto_h > sysarg printf "#define\t%s\n\n", sysproto_h > sysarg printf "#include \n" > sysarg @@ -169,10 +144,30 @@ sed -e ' printf "#define\tPADR_(t)\t0\n" > sysarg printf "#endif\n\n" > sysarg + printf "\n#ifdef %s\n\n", compat > syscompat + printf "\n#ifdef %s\n\n", compat4 > syscompat4 + printf "\n#ifdef %s\n\n", compat6 > syscompat6 + printf "\n#ifdef %s\n\n", compat7 > syscompat7 + + printf "/*\n * System call names.\n *\n" > sysnames + printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames + printf " * $%s$\n", "FreeBSD" > sysnames + printf " */\n\n" > sysnames printf "const char *%s[] = {\n", namesname > sysnames + printf "/*\n * System call numbers.\n *\n" > syshdr + printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr + printf " * $%s$\n", "FreeBSD" > syshdr + printf " */\n\n" > syshdr + + printf "# FreeBSD system call object files.\n" > sysmk + printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk + printf "# $%s$\n", "FreeBSD" > sysmk printf "MIASM = " > sysmk + printf "/*\n * System call argument to DTrace register array converstion.\n *\n" > systrace + printf " * DO NOT EDIT-- this file is automatically generated.\n" > systrace + printf " * $%s$\n", "FreeBSD" > systrace printf " * This file is part of the DTrace syscall provider.\n */\n\n" > systrace printf "static void\nsystrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)\n{\n" > systrace printf "\tint64_t *iarg = (int64_t *) uarg;\n" > systrace @@ -183,7 +178,8 @@ sed -e ' printf "static void\nsystrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)\n{\n\tconst char *p = NULL;\n" > systraceret printf "\tswitch (sysnum) {\n" > systraceret - + } + NR == 1 { next } NF == 0 || $1 ~ /^;/ {