summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/common/boot.c')
-rw-r--r--sys/boot/common/boot.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/boot/common/boot.c b/sys/boot/common/boot.c
index f69d430..4fded2c 100644
--- a/sys/boot/common/boot.c
+++ b/sys/boot/common/boot.c
@@ -53,6 +53,7 @@ command_boot(int argc, char *argv[])
struct loaded_module *km;
char *cp;
int try;
+ int i;
/*
* See if the user has specified an explicit kernel to boot.
@@ -109,6 +110,11 @@ command_boot(int argc, char *argv[])
if (archsw.arch_autoload() != 0)
return(CMD_ERROR);
+ /* Call cleanup routines */
+ for (i = 0; devsw[i] != NULL; ++i)
+ if (devsw[i]->dv_cleanup != NULL)
+ (devsw[i]->dv_cleanup)();
+
/* Call the exec handler from the loader matching the kernel */
module_formats[km->m_loader]->l_exec(km);
return(CMD_ERROR);
OpenPOWER on IntegriCloud