From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.5458.1576635040160313888 for ; Tue, 17 Dec 2019 18:10:40 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: zhichao.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Dec 2019 18:10:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,327,1571727600"; d="scan'208";a="247704938" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga002.fm.intel.com with ESMTP; 17 Dec 2019 18:10:38 -0800 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Vitaly Cheptsov Subject: [PATCH V3 0/2] *MdePkg/UefiDevicePathLib: Separate the lib instances Date: Wed, 18 Dec 2019 10:10:34 +0800 Message-Id: <20191218021036.23072-1-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2298 The UefiDevicePathLibOptionalDevicePathProtocolConstructor's implementation isn't match with its instance name. Remove the ASSERT and depex of the gEfiDevicePathUtilitiesProtocolGuid because of "Optional". Add a mandatory instance to force using the DevicePathUtilities, DevicePathToText and DevicePathFromText protocol with the ASSERT and depex. V2: The optional lib instance's construction should return success all the time. Change the desciption of the optional lib uni file. Change the copyright date of the mandatory one's uni file. V3: Remove the Status variable in UefiDevicePathLibOptionalDevicePathProtocolConstructor. The Status would cause GCC build fail because the variable is initialized but not used. Since it is useless for the constructor, directly remove it. Cc: Michael D Kinney Cc: Liming Gao Cc: Vitaly Cheptsov Signed-off-by: Zhichao Gao Zhichao Gao (2): MdePkg/UefiDevicePathLib: Separate the device path lib MdePkg/dsc: Add UefiDevicePathLibMandatoryDevicePathProtocol for build ...DevicePathLibMandatoryDevicePathProtocol.c | 469 ++++++++++++++++++ ...vicePathLibMandatoryDevicePathProtocol.inf | 86 ++++ ...vicePathLibMandatoryDevicePathProtocol.uni | 18 + ...iDevicePathLibOptionalDevicePathProtocol.c | 21 +- ...evicePathLibOptionalDevicePathProtocol.inf | 5 +- ...evicePathLibOptionalDevicePathProtocol.uni | 6 +- MdePkg/MdePkg.dsc | 3 +- 7 files changed, 587 insertions(+), 21 deletions(-) create mode 100644 MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibMandatoryDevicePathProtocol.c create mode 100644 MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibMandatoryDevicePathProtocol.inf create mode 100644 MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibMandatoryDevicePathProtocol.uni -- 2.21.0.windows.1