summaryrefslogtreecommitdiffstats
path: root/src/core/main.c
diff options
context:
space:
mode:
authorMichael Brown2007-07-04 00:09:56 +0200
committerMichael Brown2007-07-04 00:09:56 +0200
commit89349d7fad252f0b36be4a764369e6dd40a2e692 (patch)
tree72b112d6152fadee77673994f1e92b82a9c506e8 /src/core/main.c
parentAdded missing line to set return status code. (diff)
downloadipxe-89349d7fad252f0b36be4a764369e6dd40a2e692.tar.gz
ipxe-89349d7fad252f0b36be4a764369e6dd40a2e692.tar.xz
ipxe-89349d7fad252f0b36be4a764369e6dd40a2e692.zip
Separated out initialisation functions from startup/shutdown functions.
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 5b01df9c..09dccc76 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1,5 +1,5 @@
/**************************************************************************
-Etherboot - Network Bootstrap Program
+gPXE - Network Bootstrap Program
Literature dealing with the network protocols:
ARP - RFC826
@@ -14,49 +14,19 @@ Literature dealing with the network protocols:
**************************************************************************/
-#include <gpxe/heap.h>
#include <gpxe/init.h>
-#include <gpxe/process.h>
-#include <gpxe/device.h>
#include <gpxe/shell.h>
#include <gpxe/shell_banner.h>
-#include <gpxe/shutdown.h>
-#include <gpxe/hidemem.h>
#include <usr/autoboot.h>
/**
- * Start up Etherboot
- *
- * Call this function only once, before doing (almost) anything else.
- */
-static void startup ( void ) {
- init_heap();
- init_processes();
-
- hide_etherboot();
- call_init_fns();
- probe_devices();
-}
-
-/**
- * Shut down Etherboot
- *
- * Call this function only once, before either exiting main() or
- * starting up a non-returnable image.
- */
-void shutdown ( void ) {
- remove_devices();
- call_exit_fns();
- unhide_etherboot();
-}
-
-/**
* Main entry point
*
* @ret rc Return status code
*/
int main ( void ) {
+ initialise();
startup();
/* Try autobooting if we're not going straight to the shell */