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/arch/i386/interface/pcbios/int13.c | |
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/arch/i386/interface/pcbios/int13.c')
-rw-r--r-- | src/arch/i386/interface/pcbios/int13.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/arch/i386/interface/pcbios/int13.c b/src/arch/i386/interface/pcbios/int13.c index 1d973e77..a27dbad7 100644 --- a/src/arch/i386/interface/pcbios/int13.c +++ b/src/arch/i386/interface/pcbios/int13.c @@ -1209,8 +1209,10 @@ static int int13_hook ( struct uri *uri, unsigned int drive ) { int13->cylinders, int13->heads, int13->sectors_per_track ); /* Hook INT 13 vector if not already hooked */ - if ( list_empty ( &int13s ) ) + if ( list_empty ( &int13s ) ) { int13_hook_vector(); + devices_get(); + } /* Add to list of emulated drives */ list_add ( &int13->list, &int13s ); @@ -1277,8 +1279,10 @@ static void int13_unhook ( unsigned int drive ) { DBGC ( int13, "INT13 drive %02x unregistered\n", int13->drive ); /* Unhook INT 13 vector if no more drives */ - if ( list_empty ( &int13s ) ) + if ( list_empty ( &int13s ) ) { + devices_put(); int13_unhook_vector(); + } /* Drop list's reference to drive */ ref_put ( &int13->refcnt ); |