From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 41C501A1DFF for ; Mon, 17 Oct 2016 01:52:40 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP; 17 Oct 2016 01:52:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,357,1473145200"; d="scan'208";a="773489362" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by FMSMGA003.fm.intel.com with ESMTP; 17 Oct 2016 01:52:38 -0700 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Laszlo Ersek , Liming Gao , Eric Dong Date: Mon, 17 Oct 2016 16:51:55 +0800 Message-Id: <1476694318-18804-2-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1476694318-18804-1-git-send-email-dandan.bi@intel.com> References: <1476694318-18804-1-git-send-email-dandan.bi@intel.com> Subject: [patch 2/5] MdeModulePkg/BMMUI: Remove the incorrect and useless codes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2016 08:52:40 -0000 When updating console page, the "ConsoleCheck" in BmmFakeNvData may maintain the old uncommitted data, we should not copy it to BmmOldFakeNVData. And in BootMaintRouteConfig function, when save data successfully, it will copy the BmmFakeNvData to the BmmOldFakeNVData. So we can delete the logic here. Cc: Laszlo Ersek Cc: Liming Gao Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- .../Library/BootMaintenanceManagerUiLib/UpdatePage.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c index ee8ff5d..960d0b0 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c @@ -457,46 +457,36 @@ UpdateConsolePage ( BM_TERMINAL_CONTEXT *NewTerminalContext; UINT16 Index; UINT16 Index2; UINT8 CheckFlags; UINT8 *ConsoleCheck; - UINT8 *OldConsoleCheck; - UINTN ConsoleCheckSize; EFI_QUESTION_ID QuestionIdBase; UINT16 VariableOffsetBase; CallbackData->BmmAskSaveOrNot = TRUE; UpdatePageStart (CallbackData); ConsoleCheck = NULL; - OldConsoleCheck = NULL; QuestionIdBase = 0; VariableOffsetBase = 0; - ConsoleCheckSize = 0; switch (UpdatePageId) { case FORM_CON_IN_ID: ConsoleCheck = &CallbackData->BmmFakeNvData.ConsoleInCheck[0]; - OldConsoleCheck = &CallbackData->BmmOldFakeNVData.ConsoleInCheck[0]; - ConsoleCheckSize = sizeof (CallbackData->BmmFakeNvData.ConsoleInCheck); QuestionIdBase = CON_IN_DEVICE_QUESTION_ID; VariableOffsetBase = CON_IN_DEVICE_VAR_OFFSET; break; case FORM_CON_OUT_ID: ConsoleCheck = &CallbackData->BmmFakeNvData.ConsoleOutCheck[0]; - OldConsoleCheck = &CallbackData->BmmOldFakeNVData.ConsoleOutCheck[0]; - ConsoleCheckSize = sizeof (CallbackData->BmmFakeNvData.ConsoleOutCheck); QuestionIdBase = CON_OUT_DEVICE_QUESTION_ID; VariableOffsetBase = CON_OUT_DEVICE_VAR_OFFSET; break; case FORM_CON_ERR_ID: ConsoleCheck = &CallbackData->BmmFakeNvData.ConsoleErrCheck[0]; - OldConsoleCheck = &CallbackData->BmmOldFakeNVData.ConsoleErrCheck[0]; - ConsoleCheckSize = sizeof (CallbackData->BmmFakeNvData.ConsoleErrCheck); QuestionIdBase = CON_ERR_DEVICE_QUESTION_ID; VariableOffsetBase = CON_ERR_DEVICE_VAR_OFFSET; break; } ASSERT (ConsoleCheck != NULL); @@ -554,12 +544,10 @@ UpdateConsolePage ( ); Index++; } - CopyMem (OldConsoleCheck, ConsoleCheck, ConsoleCheckSize); - UpdatePageEnd (CallbackData); } /** Update the page's NV Map if user has changed the order -- 1.9.5.msysgit.1