Update FileLib to use pointer to BlockIo->Media and not a cached copy also add some code in the library init that allows removable media devices to be probed to see if a media change has happened.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10449 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish
2010-04-30 19:40:17 +00:00
parent 24542fb211
commit 0a0951ea84
3 changed files with 42 additions and 15 deletions

View File

@@ -111,24 +111,24 @@ EblPrintBlkIoInfo (
EfiClose (FsFile);
break;
}
EfiClose (FsFile);
}
EfiClose (FsFile);
}
}
// Print out useful Block IO media properties
if (File->FsBlockIoMedia.RemovableMedia) {
if (File->FsBlockIoMedia->RemovableMedia) {
AsciiPrint ("Removable ");
}
if (!File->FsBlockIoMedia.MediaPresent) {
AsciiPrint ("No Media ");
if (!File->FsBlockIoMedia->MediaPresent) {
AsciiPrint ("No Media\n");
} else {
if (File->FsBlockIoMedia->LogicalPartition) {
AsciiPrint ("Partition ");
}
DeviceSize = MultU64x32 (File->FsBlockIoMedia->LastBlock + 1, File->FsBlockIoMedia->BlockSize);
AsciiPrint ("Size = 0x%lX\n", DeviceSize);
}
if (File->FsBlockIoMedia.LogicalPartition) {
AsciiPrint ("Partition ");
}
DeviceSize = MultU64x32 (File->FsBlockIoMedia.LastBlock + 1, File->FsBlockIoMedia.BlockSize);
AsciiPrint ("Size = 0x%lX\n", DeviceSize);
EfiClose (File);
}