Private->ParentBlockIo = ParentBlockIo;\r
Private->DiskIo = ParentDiskIo;\r
\r
- Private->BlockIo.Revision = EFI_BLOCK_IO_PROTOCOL_REVISION;\r
+ Private->BlockIo.Revision = ParentBlockIo->Revision;\r
\r
Private->BlockIo.Media = &Private->Media;\r
- CopyMem (Private->BlockIo.Media, ParentBlockIo->Media, sizeof (EFI_BLOCK_IO_MEDIA));\r
+ CopyMem (Private->BlockIo.Media, ParentBlockIo->Media, SIZE_OF_EFI_BLOCK_IO_MEDIA_REV1);\r
Private->Media.LogicalPartition = TRUE;\r
Private->Media.LastBlock = DivU64x32 (\r
MultU64x32 (\r
(((UINT8 *) a)[3] << 24) )\r
\r
\r
+#define SIZE_OF_EFI_BLOCK_IO_MEDIA_REV1 ((UINTN)&((EFI_BLOCK_IO_MEDIA *)0)->LastBlock + sizeof(EFI_LBA))\r
+#define SIZE_OF_EFI_BLOCK_IO_MEDIA_REV2 sizeof(EFI_BLOCK_IO_MEDIA)\r
+\r
//\r
// GPT Partition Entry Status\r
//\r
# Module that produces EBC Interprete and EBC Debug Support protocols.\r
# \r
# This module implements EFI Byte Code (EBC) Virtual Machine that can provide \r
-# platform and processor-independent mechanisms forloading and executing EFI\r
+# platform and processor-independent mechanisms for loading and executing EFI\r
# device drivers.\r
#\r
# Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r