From 962cada830e9b0ce7049a59bef4c33ab01c6161e Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 27 Jan 2011 20:35:48 +0000 Subject: [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 --- src/core/device.c | 7 +++++-- src/core/main.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/core') 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; } -- cgit v1.2.3-55-g7522