summaryrefslogtreecommitdiffstats
path: root/src/core/init.c
diff options
context:
space:
mode:
authorMichael Brown2008-07-17 18:45:17 +0200
committerMichael Brown2008-07-17 18:45:17 +0200
commit03c80c12b8e9019554c3bd4545cf68926ee1ce47 (patch)
treead2217eda5c315775a86708e166c85a9f04926ff /src/core/init.c
parent[phantom] Guard against partially-written status descriptors (diff)
downloadipxe-03c80c12b8e9019554c3bd4545cf68926ee1ce47.tar.gz
ipxe-03c80c12b8e9019554c3bd4545cf68926ee1ce47.tar.xz
ipxe-03c80c12b8e9019554c3bd4545cf68926ee1ce47.zip
[iSCSI] Support Windows Server 2008 direct iSCSI installation
Add yet another ugly hack to iscsiboot.c, this time to allow the user to inhibit the shutdown/removal of the iSCSI INT13 device (and the network devices, since they are required for the iSCSI device to function). On the plus side, the fact that shutdown() now takes flags to differentiate between shutdown-for-exit and shutdown-for-boot means that another ugly hack (to allow returning via the PXE stack on BIOSes that have broken INT 18 calls) will be easier. I feel dirty.
Diffstat (limited to 'src/core/init.c')
-rw-r--r--src/core/init.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/core/init.c b/src/core/init.c
index ed91bf36..50e199ce 100644
--- a/src/core/init.c
+++ b/src/core/init.c
@@ -79,17 +79,14 @@ void startup ( void ) {
startup_fn->startup();
}
- /* Probe for all devices. Treated separately because nothing
- * else will drag in device.o
- */
- probe_devices();
-
started = 1;
}
/**
* Shut down gPXE
*
+ * @v flags Shutdown behaviour flags
+ *
* This function reverses the actions of startup(), and leaves gPXE in
* a state ready to be removed from memory. You may call startup()
* again after calling shutdown().
@@ -97,20 +94,17 @@ void startup ( void ) {
* Call this function only once, before either exiting main() or
* starting up a non-returnable image.
*/
-void shutdown ( void ) {
+void shutdown ( int flags ) {
struct startup_fn *startup_fn;
if ( ! started )
return;
- /* Remove all devices */
- remove_devices();
-
/* Call registered shutdown functions (in reverse order) */
for ( startup_fn = startup_fns_end - 1 ; startup_fn >= startup_fns ;
startup_fn-- ) {
if ( startup_fn->shutdown )
- startup_fn->shutdown();
+ startup_fn->shutdown ( flags );
}
started = 0;