aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/device.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2011-01-27 20:35:48 +0000
committerMichael Brown <mcb30@ipxe.org>2011-01-27 20:40:26 +0000
commit962cada830e9b0ce7049a59bef4c33ab01c6161e (patch)
tree057160b6a5f46e3e099166102f3a91b393d35103 /src/core/device.c
parent35a50399a5881360303c0ed2d49918a660dd727d (diff)
downloadipxe-962cada830e9b0ce7049a59bef4c33ab01c6161e.tar.gz
[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/device.c')
-rw-r--r--src/core/device.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/device.c b/src/core/device.c
index cb2c23b0..dc182e03 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;
}