Date: Tue, 13 Mar 2018 13:09:11 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330842 - head/sys/kern Message-ID: <201803131309.w2DD9BAD003960@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803131309.w2DD9BAD003960>