mirror of https://github.com/acidanthera/audk.git
Add in code to support the deletion of opcode from a form.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5153 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
5391c4f160
commit
f274810c8d
|
@ -435,32 +435,50 @@ Returns:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Data->DataCount != 0) {
|
if (HandleMapEntry->IsPackageListWithOnlyStringPackages) {
|
||||||
if (HandleMapEntry->IsPackageListWithOnlyStringPackages) {
|
UefiHiiHandle = TagGuidToUefiIfrHiiHandle (Private, &HandleMapEntry->TagGuid);
|
||||||
UefiHiiHandle = TagGuidToUefiIfrHiiHandle (Private, &HandleMapEntry->TagGuid);
|
|
||||||
|
if (UefiHiiHandle == NULL) {
|
||||||
if (UefiHiiHandle == NULL) {
|
return EFI_INVALID_PARAMETER;
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
UefiHiiHandle = HandleMapEntry->UefiHiiHandle;
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
UefiHiiHandle = HandleMapEntry->UefiHiiHandle;
|
||||||
|
}
|
||||||
|
|
||||||
UefiHiiUpdateData = NULL;
|
UefiHiiUpdateData = NULL;
|
||||||
|
|
||||||
|
if (AddData) {
|
||||||
|
if (Data->DataCount != 0) {
|
||||||
|
|
||||||
|
Status = ThunkFrameworkUpdateDataToUefiUpdateData (Data, AddData, &UefiHiiUpdateData);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
Status = ThunkLocateFormId (UefiHiiHandle, Label, &FormsetGuid, &FormId);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
Status = IfrLibUpdateForm (UefiHiiHandle, &FormsetGuid, FormId, Label, AddData, UefiHiiUpdateData);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
Status = ThunkFrameworkUpdateDataToUefiUpdateData (Data, AddData, &UefiHiiUpdateData);
|
} else {
|
||||||
ASSERT_EFI_ERROR (Status);
|
|
||||||
|
|
||||||
Status = ThunkLocateFormId (UefiHiiHandle, Label, &FormsetGuid, &FormId);
|
Status = ThunkLocateFormId (UefiHiiHandle, Label, &FormsetGuid, &FormId);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Status = IfrLibUpdateForm (UefiHiiHandle, &FormsetGuid, FormId, Label, AddData, UefiHiiUpdateData);
|
//
|
||||||
ASSERT_EFI_ERROR (Status);
|
// Delete Opcode starting from Labe in FormId found
|
||||||
|
//
|
||||||
|
|
||||||
if (UefiHiiUpdateData != NULL) {
|
Status = IfrLibUpdateForm (UefiHiiHandle, &FormsetGuid, FormId, Label, FALSE, NULL);
|
||||||
SafeFreePool (UefiHiiUpdateData->Data);
|
ASSERT_EFI_ERROR (Status);
|
||||||
SafeFreePool (UefiHiiUpdateData);
|
}
|
||||||
}
|
|
||||||
|
if (UefiHiiUpdateData != NULL) {
|
||||||
|
SafeFreePool (UefiHiiUpdateData->Data);
|
||||||
|
SafeFreePool (UefiHiiUpdateData);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
|
@ -595,7 +595,7 @@ F2UCreateNumericOpCode (
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// We need to create a default
|
// We need to create a default value.
|
||||||
//
|
//
|
||||||
if (FwOpcode->Default != 0) {
|
if (FwOpcode->Default != 0) {
|
||||||
ZeroMem (&UOpcodeDefault, sizeof (UOpcodeDefault));
|
ZeroMem (&UOpcodeDefault, sizeof (UOpcodeDefault));
|
||||||
|
|
Loading…
Reference in New Issue