From owner-svn-src-head@freebsd.org Tue Mar 13 13:09:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14E3FF4C739; Tue, 13 Mar 2018 13:09:12 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B79547C120; Tue, 13 Mar 2018 13:09:11 +0000 (UTC) (envelope-from emaste@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B24E31A3CA; Tue, 13 Mar 2018 13:09:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DD9BnF003965; Tue, 13 Mar 2018 13:09:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DD9BAD003960; Tue, 13 Mar 2018 13:09:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803131309.w2DD9BAD003960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Mar 2018 13:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330842 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 13:09:12 -0000 Author: emaste Date: Tue Mar 13 13:09:10 2018 New Revision: 330842 URL: https://svnweb.freebsd.org/changeset/base/330842 Log: Use C99 designated initializers for struct execsw It it makes use slightly more clear and facilitates grepping. Modified: head/sys/kern/imgact_aout.c head/sys/kern/imgact_binmisc.c head/sys/kern/imgact_elf.c head/sys/kern/imgact_gzip.c head/sys/kern/imgact_shell.c Modified: head/sys/kern/imgact_aout.c ============================================================================== --- head/sys/kern/imgact_aout.c Tue Mar 13 12:38:26 2018 (r330841) +++ head/sys/kern/imgact_aout.c Tue Mar 13 13:09:10 2018 (r330842) @@ -337,5 +337,8 @@ exec_aout_imgact(struct image_params *imgp) /* * Tell kern_execve.c about it, with a little help from the linker. */ -static struct execsw aout_execsw = { exec_aout_imgact, "a.out" }; +static struct execsw aout_execsw = { + .ex_imgact = exec_aout_imgact, + .ex_name = "a.out" +}; EXEC_SET(aout, aout_execsw); Modified: head/sys/kern/imgact_binmisc.c ============================================================================== --- head/sys/kern/imgact_binmisc.c Tue Mar 13 12:38:26 2018 (r330841) +++ head/sys/kern/imgact_binmisc.c Tue Mar 13 13:09:10 2018 (r330842) @@ -753,5 +753,8 @@ SYSUNINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE /* * Tell kern_execve.c about it, with a little help from the linker. */ -static struct execsw imgact_binmisc_execsw = { imgact_binmisc_exec, KMOD_NAME }; +static struct execsw imgact_binmisc_execsw = { + .ex_imgact = imgact_binmisc_exec, + .ex_name = KMOD_NAME +}; EXEC_SET(imgact_binmisc, imgact_binmisc_execsw); Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Tue Mar 13 12:38:26 2018 (r330841) +++ head/sys/kern/imgact_elf.c Tue Mar 13 13:09:10 2018 (r330842) @@ -2426,8 +2426,8 @@ __elfN(check_note)(struct image_params *imgp, Elf_Bran * Tell kern_execve.c about it, with a little help from the linker. */ static struct execsw __elfN(execsw) = { - __CONCAT(exec_, __elfN(imgact)), - __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) + .ex_imgact = __CONCAT(exec_, __elfN(imgact)), + .ex_name = __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) }; EXEC_SET(__CONCAT(elf, __ELF_WORD_SIZE), __elfN(execsw)); Modified: head/sys/kern/imgact_gzip.c ============================================================================== --- head/sys/kern/imgact_gzip.c Tue Mar 13 12:38:26 2018 (r330841) +++ head/sys/kern/imgact_gzip.c Tue Mar 13 13:09:10 2018 (r330842) @@ -387,5 +387,8 @@ Flush(void *vp, u_char * ptr, u_long siz) /* * Tell kern_execve.c about it, with a little help from the linker. */ -static struct execsw gzip_execsw = {exec_gzip_imgact, "gzip"}; +static struct execsw gzip_execsw = { + .ex_imgact = exec_gzip_imgact, + .ex_name = "gzip" +}; EXEC_SET(execgzip, gzip_execsw); Modified: head/sys/kern/imgact_shell.c ============================================================================== --- head/sys/kern/imgact_shell.c Tue Mar 13 12:38:26 2018 (r330841) +++ head/sys/kern/imgact_shell.c Tue Mar 13 13:09:10 2018 (r330842) @@ -255,5 +255,8 @@ exec_shell_imgact(struct image_params *imgp) /* * Tell kern_execve.c about it, with a little help from the linker. */ -static struct execsw shell_execsw = { exec_shell_imgact, "#!" }; +static struct execsw shell_execsw = { + .ex_imgact = exec_shell_imgact, + .ex_name = "#!" +}; EXEC_SET(shell, shell_execsw);