Perfect the msa of the following modules, DiskIo, Partition, English and Ebc.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2480 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2007-03-16 02:33:49 +00:00
parent 8f6b43f235
commit 6626ad113e
13 changed files with 96 additions and 114 deletions

View File

@@ -279,7 +279,7 @@ Returns:
}
}
gBS->FreePool (VolDescriptor);
FreePool (VolDescriptor);
return Found;
}

View File

@@ -310,19 +310,19 @@ Returns:
Done:
if (ProtectiveMbr != NULL) {
gBS->FreePool (ProtectiveMbr);
FreePool (ProtectiveMbr);
}
if (PrimaryHeader != NULL) {
gBS->FreePool (PrimaryHeader);
FreePool (PrimaryHeader);
}
if (BackupHeader != NULL) {
gBS->FreePool (BackupHeader);
FreePool (BackupHeader);
}
if (PartEntry != NULL) {
gBS->FreePool (PartEntry);
FreePool (PartEntry);
}
if (PEntryStatus != NULL) {
gBS->FreePool (PEntryStatus);
FreePool (PEntryStatus);
}
return GptValid;
@@ -376,7 +376,7 @@ Returns:
PartHdr
);
if (EFI_ERROR (Status)) {
gBS->FreePool (PartHdr);
FreePool (PartHdr);
return FALSE;
}
@@ -385,18 +385,18 @@ Returns:
PartHdr->MyLBA != Lba
) {
DEBUG ((EFI_D_INFO, " !Valid efi partition table header\n"));
gBS->FreePool (PartHdr);
FreePool (PartHdr);
return FALSE;
}
CopyMem (PartHeader, PartHdr, sizeof (EFI_PARTITION_TABLE_HEADER));
if (!PartitionCheckGptEntryArrayCRC (BlockIo, DiskIo, PartHeader)) {
gBS->FreePool (PartHdr);
FreePool (PartHdr);
return FALSE;
}
DEBUG ((EFI_D_INFO, " Valid efi partition table header\n"));
gBS->FreePool (PartHdr);
FreePool (PartHdr);
return TRUE;
}
@@ -449,7 +449,7 @@ Returns:
Ptr
);
if (EFI_ERROR (Status)) {
gBS->FreePool (Ptr);
FreePool (Ptr);
return FALSE;
}
@@ -458,11 +458,11 @@ Returns:
Status = gBS->CalculateCrc32 (Ptr, Size, &Crc);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "CheckPEntryArrayCRC: Crc calculation failed\n"));
gBS->FreePool (Ptr);
FreePool (Ptr);
return FALSE;
}
gBS->FreePool (Ptr);
FreePool (Ptr);
return (BOOLEAN) (PartHeader->PartitionEntryArrayCRC32 == Crc);
}
@@ -555,8 +555,8 @@ Returns:
);
Done:
gBS->FreePool (PartHdr);
gBS->FreePool (Ptr);
FreePool (PartHdr);
FreePool (Ptr);
if (EFI_ERROR (Status)) {
return FALSE;

View File

@@ -184,7 +184,7 @@ Returns:
if (DevicePathType (LastDevicePathNode) == MEDIA_DEVICE_PATH &&
DevicePathSubType (LastDevicePathNode) == MEDIA_HARDDRIVE_DP
) {
gBS->CopyMem (&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev));
CopyMem (&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev));
} else {
LastDevicePathNode = NULL;
}
@@ -319,7 +319,7 @@ Returns:
}
Done:
gBS->FreePool (Mbr);
FreePool (Mbr);
return Found;
}

View File

@@ -384,8 +384,8 @@ PartitionDriverBindingStop (
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
);
} else {
gBS->FreePool (Private->DevicePath);
gBS->FreePool (Private);
FreePool (Private->DevicePath);
FreePool (Private);
}
}
@@ -653,7 +653,7 @@ Returns:
Private->DevicePath = AppendDevicePathNode (ParentDevicePath, DevicePathNode);
if (Private->DevicePath == NULL) {
gBS->FreePool (Private);
FreePool (Private);
return EFI_OUT_OF_RESOURCES;
}
@@ -693,8 +693,8 @@ Returns:
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
);
} else {
gBS->FreePool (Private->DevicePath);
gBS->FreePool (Private);
FreePool (Private->DevicePath);
FreePool (Private);
}
return Status;

View File

@@ -6,8 +6,11 @@
<GuidValue>1FA1F39E-FEFF-4aae-BD7B-38A070A3B609</GuidValue>
<Version>1.0</Version>
<Abstract>Component description file for Partition module.</Abstract>
<Description>Partition driver that produces logical BlockIo devices from a physical BlockIo device.</Description>
<Copyright>Copyright (c) 2006, Intel Corporation</Copyright>
<Description>Partition driver produces the logical BlockIo device
that represents the bytes Start to End of the Parent Block IO
device (one partition of physical BlockIo device,
which can be one of GPT, MBR, ElTorito partition).</Description>
<Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
<License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,8 +25,9 @@
<OutputFileBasename>Partition</OutputFileBasename>
</ModuleDefinitions>
<LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_CONSUMED">
<LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword>
<HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiDriverModelLib</Keyword>
@@ -71,12 +75,18 @@
<Protocol Usage="TO_START">
<ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
</Protocol>
<Protocol Usage="BY_START">
<ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
</Protocol>
<Protocol Usage="BY_START">
<ProtocolCName>gEfiBlockIoProtocolGuid</ProtocolCName>
</Protocol>
</Protocols>
<Guids>
<GuidCNames Usage="SOMETIMES_CONSUMED">
<GuidCName>gEfiPartTypeSystemPartGuid</GuidCName>
</GuidCNames>
<GuidCNames Usage="ALWAYS_CONSUMED">
<GuidCNames Usage="SOMETIMES_CONSUMED">
<GuidCName>gEfiPartTypeUnusedGuid</GuidCName>
</GuidCNames>
</Guids>