mirror of https://github.com/acidanthera/audk.git
Only generate the random GUID if a package list already exist in the database.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5902 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1947c70c3e
commit
b436ed893b
|
@ -307,13 +307,6 @@ UefiRegisterPackageList(
|
||||||
CopyGuid (&ThunkContext->TagGuid, Packages->GuidId);
|
CopyGuid (&ThunkContext->TagGuid, Packages->GuidId);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// UEFI HII database does not allow two package list with the same GUID.
|
|
||||||
// In Framework HII implementation, Packages->GuidId is used as an identifier to associate
|
|
||||||
// a PackageList with only IFR to a Package list the with String package.
|
|
||||||
//
|
|
||||||
GenerateRandomGuid (&GuidId);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// UEFI HII require EFI_HII_CONFIG_ACCESS_PROTOCOL to be installed on a EFI_HANDLE, so
|
// UEFI HII require EFI_HII_CONFIG_ACCESS_PROTOCOL to be installed on a EFI_HANDLE, so
|
||||||
// that Setup Utility can load the Buffer Storage using this protocol.
|
// that Setup Utility can load the Buffer Storage using this protocol.
|
||||||
|
@ -321,13 +314,31 @@ UefiRegisterPackageList(
|
||||||
if (IfrPackageCount != 0) {
|
if (IfrPackageCount != 0) {
|
||||||
InstallDefaultConfigAccessProtocol (Packages, ThunkContext);
|
InstallDefaultConfigAccessProtocol (Packages, ThunkContext);
|
||||||
}
|
}
|
||||||
PackageListHeader = PrepareUefiPackageListFromFrameworkHiiPackages (Packages, &GuidId);
|
PackageListHeader = PrepareUefiPackageListFromFrameworkHiiPackages (Packages, &ThunkContext->TagGuid);
|
||||||
Status = mHiiDatabase->NewPackageList (
|
Status = mHiiDatabase->NewPackageList (
|
||||||
mHiiDatabase,
|
mHiiDatabase,
|
||||||
PackageListHeader,
|
PackageListHeader,
|
||||||
ThunkContext->UefiHiiDriverHandle,
|
ThunkContext->UefiHiiDriverHandle,
|
||||||
&ThunkContext->UefiHiiHandle
|
&ThunkContext->UefiHiiHandle
|
||||||
);
|
);
|
||||||
|
if (Status == EFI_INVALID_PARAMETER) {
|
||||||
|
SafeFreePool (PackageListHeader);
|
||||||
|
|
||||||
|
//
|
||||||
|
// UEFI HII database does not allow two package list with the same GUID.
|
||||||
|
// In Framework HII implementation, Packages->GuidId is used as an identifier to associate
|
||||||
|
// a PackageList with only IFR to a Package list the with String package.
|
||||||
|
//
|
||||||
|
GenerateRandomGuid (&GuidId);
|
||||||
|
|
||||||
|
PackageListHeader = PrepareUefiPackageListFromFrameworkHiiPackages (Packages, &GuidId);
|
||||||
|
Status = mHiiDatabase->NewPackageList (
|
||||||
|
mHiiDatabase,
|
||||||
|
PackageListHeader,
|
||||||
|
ThunkContext->UefiHiiDriverHandle,
|
||||||
|
&ThunkContext->UefiHiiHandle
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// BUGBUG: Remove when development is done
|
// BUGBUG: Remove when development is done
|
||||||
|
|
Loading…
Reference in New Issue