From e4dc1b14d8dc57c3975bf69740e4f5cda6bfba09 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 16 Oct 2007 23:26:03 -0700 Subject: Use list_head in binfmt handling Switch single-linked binfmt formats list to usual list_head's. This leads to one-liners in register_binfmt() and unregister_binfmt(). The downside is one pointer more in struct linux_binfmt. This is not a problem, since the set of registered binfmts on typical box is very small -- (ELF + something distro enabled for you). Test-booted, played with executable .txt files, modprobe/rmmod binfmt_misc. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/sparc64/kernel/binfmt_aout32.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'arch/sparc64') diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c index d208cc7804f..c8acbeab49b 100644 --- a/arch/sparc64/kernel/binfmt_aout32.c +++ b/arch/sparc64/kernel/binfmt_aout32.c @@ -38,8 +38,11 @@ static int load_aout32_library(struct file*); static int aout32_core_dump(long signr, struct pt_regs * regs, struct file *file); static struct linux_binfmt aout32_format = { - NULL, THIS_MODULE, load_aout32_binary, load_aout32_library, aout32_core_dump, - PAGE_SIZE + .module = THIS_MODULE, + .load_binary = load_aout32_binary, + .load_shlib = load_aout32_library, + .core_dump = aout32_core_dump, + .min_coredump = PAGE_SIZE, }; static void set_brk(unsigned long start, unsigned long end) -- cgit v1.2.3