summaryrefslogtreecommitdiffstats
path: root/src/core/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/init.c')
-rw-r--r--src/core/init.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/core/init.c b/src/core/init.c
index d91e4466..c13fd166 100644
--- a/src/core/init.c
+++ b/src/core/init.c
@@ -36,6 +36,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/** "startup() has been called" flag */
static int started = 0;
+/** Colour for debug messages */
+#define colour table_start ( INIT_FNS )
+
/**
* Initialise iPXE
*
@@ -69,11 +72,15 @@ void startup ( void ) {
/* Call registered startup functions */
for_each_table_entry ( startup_fn, STARTUP_FNS ) {
- if ( startup_fn->startup )
+ if ( startup_fn->startup ) {
+ DBGC ( colour, "INIT startup %s...\n",
+ startup_fn->name );
startup_fn->startup();
+ }
}
started = 1;
+ DBGC ( colour, "INIT startup complete\n" );
}
/**
@@ -96,12 +103,16 @@ void shutdown ( int flags ) {
/* Call registered shutdown functions (in reverse order) */
for_each_table_entry_reverse ( startup_fn, STARTUP_FNS ) {
- if ( startup_fn->shutdown )
+ if ( startup_fn->shutdown ) {
+ DBGC ( colour, "INIT shutdown %s...\n",
+ startup_fn->name );
startup_fn->shutdown ( flags );
+ }
}
/* Reset console */
console_reset();
started = 0;
+ DBGC ( colour, "INIT shutdown complete\n" );
}