diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-08 19:26:45 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-08 19:26:45 +0000 |
commit | 6191913fb4914f380597904f2025b1deb644e772 (patch) | |
tree | 327ace8237db4d0e395ab7556a8eee21619d9ff8 /EmbeddedPkg | |
parent | 4da3058929fed46bc508c1b30f43c62c64f196b7 (diff) | |
download | edk2-6191913fb4914f380597904f2025b1deb644e772.zip edk2-6191913fb4914f380597904f2025b1deb644e772.tar.gz edk2-6191913fb4914f380597904f2025b1deb644e772.tar.bz2 |
Removed connect/disconnect in device command and replace with simple BlockIo readblocks to probe for media change. This relies on ReinstallProtocolInterface() calls in the BlockIo drivers to make the filesystems reload.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10468 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r-- | EmbeddedPkg/Ebl/EfiDevice.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/EmbeddedPkg/Ebl/EfiDevice.c b/EmbeddedPkg/Ebl/EfiDevice.c index 80dcfcb..922be58 100644 --- a/EmbeddedPkg/Ebl/EfiDevice.c +++ b/EmbeddedPkg/Ebl/EfiDevice.c @@ -227,16 +227,10 @@ EblDeviceCmd ( File = EfiDeviceOpenByType (EfiOpenBlockIo, Index);
if (File != NULL) {
if (File->FsBlockIoMedia->RemovableMedia) {
- if (File->FsBlockIoMedia->MediaPresent) {
- // Probe to see if media is present
- Status = File->FsBlockIo->ReadBlocks (File->FsBlockIo, File->FsBlockIo->Media->MediaId, (EFI_LBA)0, 0, NULL);
- if (Status == EFI_NO_MEDIA) {
- gBS->DisconnectController (File->EfiHandle, NULL, NULL);
- }
- } else {
- // Probe for media insertion and connect partition and filesystem drivers if needed
- gBS->ConnectController (File->EfiHandle, NULL, NULL, TRUE);
- }
+ // Probe to see if media is present (or not) or media changed
+ // this causes the ReinstallProtocolInterface() to fire in the
+ // block io driver to update the system about media change events
+ File->FsBlockIo->ReadBlocks (File->FsBlockIo, File->FsBlockIo->Media->MediaId, (EFI_LBA)0, 0, NULL);
}
EfiClose (File);
}
|