From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com []) by mx.groups.io with SMTP id smtpd.web11.10993.1594689785925685440 for ; Mon, 13 Jul 2020 18:23:07 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhichao.gao@intel.com) IronPort-SDR: jDlctjLHcTmbwaBo4MfLXdKpetu8ybTDzBmGEna/oZ+vXYu8C6IqU88MO9ZVTsO0S3PhDHpwcC rATLqadHmiVQ== X-IronPort-AV: E=McAfee;i="6000,8403,9681"; a="148762720" X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="148762720" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2020 18:23:06 -0700 IronPort-SDR: A3LycmX4Lso7B17XLZ1WljRuw7qfI//F4YlNIrfa3Op96nr3EYDH8qWT/VjWw+6pwuCKasmuIo A/bKYpToYgFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="285590362" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.114]) by orsmga006.jf.intel.com with ESMTP; 13 Jul 2020 18:23:05 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Hao A Wu , Ray Ni Subject: [PATCH V3 3/3] MdeModulePkg/PartitionDxe: Add already start check for child hanldes Date: Tue, 14 Jul 2020 09:22:59 +0800 Message-Id: <20200714012259.30504-4-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200714012259.30504-1-zhichao.gao@intel.com> References: <20200714012259.30504-1-zhichao.gao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2823 Treat the EFI_ALREADY_STARTED as EFI_SUCCESS to avoid the partition driver continuely check next routine function. Cc: Hao A Wu Cc: Ray Ni Signed-off-by: Zhichao Gao Reviewed-by: Hao A Wu --- MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c index d1c878ad2e..6a43c3cafb 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c @@ -1276,6 +1276,15 @@ PartitionInstallChildHandle ( } else { FreePool (Private->DevicePath); FreePool (Private); + + // + // if the Status == EFI_ALREADY_STARTED, it means the child handles + // are already installed. So return EFI_SUCCESS to avoid do the next + // partition type check. + // + if (Status == EFI_ALREADY_STARTED) { + Status = EFI_SUCCESS; + } } return Status; -- 2.21.0.windows.1