EFI_HII_DATABASE_PROTOCOL.NewPackageList() allows installation of multiple package lists with same package list GUID onto different handles. According, change behavior of the HII Library function HiiAddPackages() to be consistent with EFI_HII_DATABASE_PROTOCOL.NewPackageList().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9452 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
6c88029b45
commit
aa2614b728
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Public include file for the HII Library
|
Public include file for the HII Library
|
||||||
|
|
||||||
Copyright (c) 2007 - 2008, Intel Corporation
|
Copyright (c) 2007 - 2009, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -24,10 +24,10 @@
|
||||||
/**
|
/**
|
||||||
Registers a list of packages in the HII Database and returns the HII Handle
|
Registers a list of packages in the HII Database and returns the HII Handle
|
||||||
associated with that registration. If an HII Handle has already been registered
|
associated with that registration. If an HII Handle has already been registered
|
||||||
with the same PackageListGuid, then NULL is returned. If there are not enough
|
with the same PackageListGuid and DeviceHandle, then NULL is returned. If there
|
||||||
resources to perform the registration, then NULL is returned. If an empty list
|
are not enough resources to perform the registration, then NULL is returned.
|
||||||
of packages is passed in, then NULL is returned. If the size of the list of
|
If an empty list of packages is passed in, then NULL is returned. If the size of
|
||||||
package is 0, then NULL is returned.
|
the list of package is 0, then NULL is returned.
|
||||||
|
|
||||||
The variable arguments are pointers that point to package headers defined
|
The variable arguments are pointers that point to package headers defined
|
||||||
by UEFI VFR compiler and StringGather tool.
|
by UEFI VFR compiler and StringGather tool.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
HII Library implementation that uses DXE protocols and services.
|
HII Library implementation that uses DXE protocols and services.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
Copyright (c) 2006 - 2009, Intel Corporation<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -105,10 +105,10 @@ InternalHiiExtractGuidFromHiiHandle (
|
||||||
/**
|
/**
|
||||||
Registers a list of packages in the HII Database and returns the HII Handle
|
Registers a list of packages in the HII Database and returns the HII Handle
|
||||||
associated with that registration. If an HII Handle has already been registered
|
associated with that registration. If an HII Handle has already been registered
|
||||||
with the same PackageListGuid, then NULL is returned. If there are not enough
|
with the same PackageListGuid and DeviceHandle, then NULL is returned. If there
|
||||||
resources to perform the registration, then NULL is returned. If an empty list
|
are not enough resources to perform the registration, then NULL is returned.
|
||||||
of packages is passed in, then NULL is returned. If the size of the list of
|
If an empty list of packages is passed in, then NULL is returned. If the size of
|
||||||
package is 0, then NULL is returned.
|
the list of package is 0, then NULL is returned.
|
||||||
|
|
||||||
The variable arguments are pointers which point to package header that defined
|
The variable arguments are pointers which point to package header that defined
|
||||||
by UEFI VFR compiler and StringGather tool.
|
by UEFI VFR compiler and StringGather tool.
|
||||||
|
@ -145,7 +145,6 @@ HiiAddPackages (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_HII_HANDLE *HiiHandleBuffer;
|
|
||||||
VA_LIST Args;
|
VA_LIST Args;
|
||||||
UINT32 *Package;
|
UINT32 *Package;
|
||||||
EFI_HII_PACKAGE_LIST_HEADER *PackageListHeader;
|
EFI_HII_PACKAGE_LIST_HEADER *PackageListHeader;
|
||||||
|
@ -155,16 +154,6 @@ HiiAddPackages (
|
||||||
|
|
||||||
ASSERT (PackageListGuid != NULL);
|
ASSERT (PackageListGuid != NULL);
|
||||||
|
|
||||||
//
|
|
||||||
// Check to see if an HII Handle has already been registered with the same
|
|
||||||
// PackageListGuid
|
|
||||||
//
|
|
||||||
HiiHandleBuffer = HiiGetHiiHandles (PackageListGuid);
|
|
||||||
if (HiiHandleBuffer != NULL) {
|
|
||||||
FreePool (HiiHandleBuffer);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Calculate the length of all the packages in the variable argument list
|
// Calculate the length of all the packages in the variable argument list
|
||||||
//
|
//
|
||||||
|
@ -192,7 +181,7 @@ HiiAddPackages (
|
||||||
PackageListHeader = AllocateZeroPool (Length);
|
PackageListHeader = AllocateZeroPool (Length);
|
||||||
|
|
||||||
//
|
//
|
||||||
// If the Packahge List can not be allocated, then return a NULL HII Handle
|
// If the Package List can not be allocated, then return a NULL HII Handle
|
||||||
//
|
//
|
||||||
if (PackageListHeader == NULL) {
|
if (PackageListHeader == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Implementation for EFI_HII_DATABASE_PROTOCOL.
|
Implementation for EFI_HII_DATABASE_PROTOCOL.
|
||||||
|
|
||||||
|
Copyright (c) 2007 - 2009, Intel Corporation
|
||||||
Copyright (c) 2007 - 2008, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -2740,9 +2739,8 @@ HiiNewPackageList (
|
||||||
DatabaseRecord = CR (Link, HII_DATABASE_RECORD, DatabaseEntry, HII_DATABASE_RECORD_SIGNATURE);
|
DatabaseRecord = CR (Link, HII_DATABASE_RECORD, DatabaseEntry, HII_DATABASE_RECORD_SIGNATURE);
|
||||||
if (CompareGuid (
|
if (CompareGuid (
|
||||||
&(DatabaseRecord->PackageList->PackageListHdr.PackageListGuid),
|
&(DatabaseRecord->PackageList->PackageListHdr.PackageListGuid),
|
||||||
&PackageListGuid
|
&PackageListGuid) &&
|
||||||
)
|
DatabaseRecord->DriverHandle == DriverHandle) {
|
||||||
) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue