From 84db9040cc8ba556faec61ad3480c774ca8b984c Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Thu, 15 Oct 2015 00:57:45 +0000 Subject: IntelFrameworkModulePkg BdsDxe: Use PcdSet##S to replace PcdSet## PcdSet## has no error status returned, then the caller has no idea about whether the set operation is successful or not. PcdSet##S were added to return error status and PcdSet## APIs were put in ifndef DISABLE_NEW_DEPRECATED_INTERFACES condition. To adopt PcdSet##S and further code development with DISABLE_NEW_DEPRECATED_INTERFACES defined, we need to Replace PcdSet## usage with PcdSet##S. Normally, DynamicDefault PCD set is expected to be success, but DynamicHii PCD set failure is a legal case. So for DynamicDefault, we add assert when set failure. For DynamicHii, we add logic to handle it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Star Zeng git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18605 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c') diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c index 616549e64a..b933dd9699 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c @@ -1370,9 +1370,11 @@ Var_UpdateConMode ( Status = gST->ConOut->QueryMode (gST->ConOut, Mode, &(ModeInfo.Column), &(ModeInfo.Row)); if (!EFI_ERROR(Status)) { - PcdSet32 (PcdSetupConOutColumn, (UINT32) ModeInfo.Column); - PcdSet32 (PcdSetupConOutRow, (UINT32) ModeInfo.Row); + Status = PcdSet32S (PcdSetupConOutColumn, (UINT32) ModeInfo.Column); + if (!EFI_ERROR (Status)){ + Status = PcdSet32S (PcdSetupConOutRow, (UINT32) ModeInfo.Row); + } } - return EFI_SUCCESS; + return Status; } -- cgit v1.2.3