summaryrefslogtreecommitdiff
path: root/sys/alpha/linux/linux_sysvec.c
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2000-11-23 03:21:58 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2000-11-23 03:21:58 +0000
commit466b14d75884a8ed0b011c3e488ef8f9d71152c6 (patch)
treef57b344b2da71d8086504acaf3155c4ed989665f /sys/alpha/linux/linux_sysvec.c
parent162b57c009a94e0f21611d92ca884ebcce9126a3 (diff)
Notes
Diffstat (limited to 'sys/alpha/linux/linux_sysvec.c')
-rw-r--r--sys/alpha/linux/linux_sysvec.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c
index 8b4e13c4b7af..0c4bfc1970f8 100644
--- a/sys/alpha/linux/linux_sysvec.c
+++ b/sys/alpha/linux/linux_sysvec.c
@@ -224,37 +224,39 @@ linux_elf_modevent(module_t mod, int type, void *data)
++brandinfo)
if (elf_insert_brand_entry(*brandinfo) < 0)
error = EINVAL;
- if (error)
- printf("cannot insert Linux elf brand handler\n");
- else {
- linux_ioctl_register_handlers(&linux_ioctl_handler_set);
+ if (error == 0) {
+ linux_ioctl_register_handlers(
+ &linux_ioctl_handler_set);
if (bootverbose)
- printf("Linux-ELF exec handler installed\n");
- }
+ printf("Linux ELF exec handler installed\n");
+ } else
+ printf("cannot insert Linux ELF brand handler\n");
break;
case MOD_UNLOAD:
- linux_ioctl_unregister_handlers(&linux_ioctl_handler_set);
for (brandinfo = &linux_brandlist[0]; *brandinfo != NULL;
++brandinfo)
if (elf_brand_inuse(*brandinfo))
error = EBUSY;
-
if (error == 0) {
for (brandinfo = &linux_brandlist[0];
*brandinfo != NULL; ++brandinfo)
if (elf_remove_brand_entry(*brandinfo) < 0)
error = EINVAL;
}
- if (error)
+ if (error == 0) {
+ linux_ioctl_unregister_handlers(
+ &linux_ioctl_handler_set);
+ if (bootverbose)
+ printf("Linux ELF exec handler removed\n");
+ } else
printf("Could not deinstall ELF interpreter entry\n");
- else if (bootverbose)
- printf("Linux-elf exec handler removed\n");
break;
default:
break;
}
return error;
}
+
static moduledata_t linux_elf_mod = {
"linuxelf",
linux_elf_modevent,