summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformPei/Xen.c
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-10-21 11:59:36 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-10-25 10:46:22 +0200
commit32e083c71d1dc650dc197fac5b04cafdb6d01b8b (patch)
tree807181b567fcf076d9ea391390cd63129b24d5ab /OvmfPkg/PlatformPei/Xen.c
parent4d1362e1f982669ce630901126b97ff36b7806de (diff)
downloadedk2-32e083c71d1dc650dc197fac5b04cafdb6d01b8b.tar.gz
edk2-32e083c71d1dc650dc197fac5b04cafdb6d01b8b.tar.bz2
edk2-32e083c71d1dc650dc197fac5b04cafdb6d01b8b.zip
OvmfPkg/PlatformPei: eliminate unchecked PcdSetXX() calls
These are deprecated / disabled under the DISABLE_NEW_DEPRECATED_INTERFACES feature test macro. Introduce a variable called PcdStatus, and use it to assert the success of these operations (there is no reason for them to fail here). Cc: Anthony PERARD <anthony.perard@citrix.com> Cc: Gary Lin <glin@suse.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=166 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Gary Lin <glin@suse.com> Tested-by: Gary Lin <glin@suse.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg/PlatformPei/Xen.c')
-rw-r--r--OvmfPkg/PlatformPei/Xen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/OvmfPkg/PlatformPei/Xen.c b/OvmfPkg/PlatformPei/Xen.c
index 223908a4f5..ab38f97a67 100644
--- a/OvmfPkg/PlatformPei/Xen.c
+++ b/OvmfPkg/PlatformPei/Xen.c
@@ -210,6 +210,8 @@ InitializeXen (
VOID
)
{
+ RETURN_STATUS PcdStatus;
+
if (mXenLeaf == 0) {
return EFI_NOT_FOUND;
}
@@ -222,7 +224,8 @@ InitializeXen (
//
AddReservedMemoryBaseSizeHob (0xFC000000, 0x1000000, FALSE);
- PcdSetBool (PcdPciDisableBusEnumeration, TRUE);
+ PcdStatus = PcdSetBoolS (PcdPciDisableBusEnumeration, TRUE);
+ ASSERT_RETURN_ERROR (PcdStatus);
return EFI_SUCCESS;
}