summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/device.c7
-rw-r--r--src/core/main.c2
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;
}