Use C99 designated initializers for struct execsw
It it makes use slightly more clear and facilitates grepping.
This commit is contained in:
parent
3fa80706a5
commit
742eaeb102
@ -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);
|
||||
|
@ -753,5 +753,8 @@ SYSUNINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_fini, 0);
|
||||
/*
|
||||
* 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);
|
||||
|
@ -2426,8 +2426,8 @@ __elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote,
|
||||
* 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));
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user