diff options
author | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-06 02:00:37 +0000 |
---|---|---|
committer | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-06 02:00:37 +0000 |
commit | 7ee3b61338de1fa592227c719eca20f7813ea606 (patch) | |
tree | 057ca20e53d6384346f3e61114e450eb9bd1bc9c /UnixPkg/UnixBlockIoDxe | |
parent | 2ef2b01e07c02db339f34004445734a2dbdd80e1 (diff) | |
download | edk2-7ee3b61338de1fa592227c719eca20f7813ea606.zip edk2-7ee3b61338de1fa592227c719eca20f7813ea606.tar.gz edk2-7ee3b61338de1fa592227c719eca20f7813ea606.tar.bz2 |
Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9519 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UnixPkg/UnixBlockIoDxe')
-rw-r--r-- | UnixPkg/UnixBlockIoDxe/UnixBlockIo.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/UnixPkg/UnixBlockIoDxe/UnixBlockIo.c b/UnixPkg/UnixBlockIoDxe/UnixBlockIo.c index c3bd3d3..a223d82 100644 --- a/UnixPkg/UnixBlockIoDxe/UnixBlockIo.c +++ b/UnixPkg/UnixBlockIoDxe/UnixBlockIo.c @@ -774,12 +774,9 @@ Returns: //
// Open the device
//
- Private->fd = Private->UnixThunk->Open
- (Private->Filename, Private->Mode, 0644);
-
+ Private->fd = Private->UnixThunk->Open (Private->Filename, Private->Mode, 0644);
if (Private->fd < 0) {
- DEBUG ((EFI_D_INFO, "PlOpenBlock: Could not open %s\n",
- Private->Filename));
+ DEBUG ((EFI_D_INFO, "PlOpenBlock: Could not open %a\n", Private->Filename));
BlockIo->Media->MediaPresent = FALSE;
Status = EFI_NO_MEDIA;
goto Done;
@@ -798,16 +795,17 @@ Returns: // get the size of the file
//
Status = SetFilePointer64 (Private, 0, &FileSize, SEEK_END);
-
if (EFI_ERROR (Status)) {
FileSize = MultU64x32 (Private->NumberOfBlocks, Private->BlockSize);
- DEBUG ((EFI_D_ERROR, "PlOpenBlock: Could not get filesize of %s\n", Private->Filename));
+ DEBUG ((EFI_D_ERROR, "PlOpenBlock: Could not get filesize of %a\n", Private->Filename));
Status = EFI_UNSUPPORTED;
goto Done;
}
if (Private->NumberOfBlocks == 0) {
Private->NumberOfBlocks = DivU64x32 (FileSize, Private->BlockSize);
+ Private->LastBlock = Private->NumberOfBlocks - 1;
+ Private->Media.LastBlock = Private->LastBlock;
}
EndOfFile = MultU64x32 (Private->NumberOfBlocks, Private->BlockSize);
@@ -829,7 +827,7 @@ Returns: Private->UnixThunk->FTruncate (Private->fd, EndOfFile);
}
- DEBUG ((EFI_D_INIT, "%HPlOpenBlock: opened %s%N\n", Private->Filename));
+ DEBUG ((EFI_D_INIT, "%HPlOpenBlock: opened %a%N\n", Private->Filename));
Status = EFI_SUCCESS;
Done:
|