execsw
static struct execsw elf_execsw = {exec_elf64_imgact, "ELF64"};
static struct execsw elf_execsw = {exec_elf32_imgact, "ELF32"};
static struct execsw shell_execsw = { exec_shell_imgact, "#!" };
exec_register(const struct execsw *execsw_arg)
const struct execsw **es, **xs, **newexecsw;
if (execsw)
for (es = execsw; *es; es++)
if (execsw)
for (es = execsw; *es; es++)
if (execsw)
kfree(execsw, M_TEMP);
execsw = newexecsw;
exec_unregister(const struct execsw *execsw_arg)
const struct execsw **es, **xs, **newexecsw;
if (execsw == NULL)
for (es = execsw; *es; es++) {
for (es = execsw; *es; es++)
for (es = execsw; *es; es++)
if (execsw)
kfree(execsw, M_TEMP);
execsw = newexecsw;
__read_mostly static const struct execsw **execsw;
for (i = 0; error == -1 && execsw[i]; ++i) {
if (execsw[i]->ex_imgact == NULL ||
execsw[i]->ex_imgact == img_first) {
error = (*execsw[i]->ex_imgact)(imgp);
int exec_register (const struct execsw *);
int exec_unregister (const struct execsw *);
struct execsw *exec = (struct execsw *)data; \