diff options
| author | Michael Brown | 2011-01-27 21:35:48 +0100 |
|---|---|---|
| committer | Michael Brown | 2011-01-27 21:40:26 +0100 |
| commit | 962cada830e9b0ce7049a59bef4c33ab01c6161e (patch) | |
| tree | 057160b6a5f46e3e099166102f3a91b393d35103 /src/core | |
| parent | [xfer] Expose xfer_uri_opener() (diff) | |
| download | ipxe-962cada830e9b0ce7049a59bef4c33ab01c6161e.tar.gz ipxe-962cada830e9b0ce7049a59bef4c33ab01c6161e.tar.xz ipxe-962cada830e9b0ce7049a59bef4c33ab01c6161e.zip | |
[init] Remove concept of "shutdown exit flags"
Remove the concept of shutdown exit flags, and replace it with a
counter used to keep track of exposed interfaces that require devices
to remain active.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/device.c | 7 | ||||
| -rw-r--r-- | src/core/main.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/core/device.c b/src/core/device.c index cb2c23b0a..dc182e032 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -35,6 +35,9 @@ FILE_LICENCE ( GPL2_OR_LATER ); /** Registered root devices */ static LIST_HEAD ( devices ); +/** Device removal inhibition counter */ +int device_keep_count = 0; + /** * Probe a root device * @@ -87,11 +90,11 @@ static void probe_devices ( void ) { * Remove all devices * */ -static void remove_devices ( int flags ) { +static void remove_devices ( int booting __unused ) { struct root_device *rootdev; struct root_device *tmp; - if ( flags & SHUTDOWN_KEEP_DEVICES ) { + if ( device_keep_count != 0 ) { DBG ( "Refusing to remove devices on shutdown\n" ); return; } diff --git a/src/core/main.c b/src/core/main.c index a1128dd02..e2b4e3e2e 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -85,7 +85,7 @@ __asmcall int main ( void ) { shell(); } - shutdown ( SHUTDOWN_EXIT | shutdown_exit_flags ); + shutdown_exit(); return 0; } |
