From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 20C11220D4BEA for ; Mon, 13 Nov 2017 23:47:36 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2017 23:51:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,393,1505804400"; d="scan'208";a="1243808687" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.13]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2017 23:51:41 -0800 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Paulo Alcantara , Ruiyu Ni , Star Zeng , Eric Dong Date: Tue, 14 Nov 2017 15:51:29 +0800 Message-Id: <20171114075130.14936-2-hao.a.wu@intel.com> X-Mailer: git-send-email 2.12.0.windows.1 In-Reply-To: <20171114075130.14936-1-hao.a.wu@intel.com> References: <20171114075130.14936-1-hao.a.wu@intel.com> Subject: [PATCH 1/2] MdeModulePkg/PartitionDxe: Merge the discovery of ElTorito into UDF X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 07:47:36 -0000 In order to create all of the children (El Torito standard and UDF) for a CD/DVD media in an entry of the PartitionDriverBindingStart(), this commit merges the discovery of the El Torito feature (PartitionInstallElToritoChildHandles) into function PartitionInstallUdfChildHandles. Cc: Paulo Alcantara Cc: Ruiyu Ni Cc: Star Zeng Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu --- MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 7 +++---- MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c index f6030e0897..603abfe55a 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c @@ -43,7 +43,6 @@ EFI_DRIVER_BINDING_PROTOCOL gPartitionDriverBinding = { // PARTITION_DETECT_ROUTINE mPartitionDetectRoutineTable[] = { PartitionInstallGptChildHandles, - PartitionInstallElToritoChildHandles, PartitionInstallMbrChildHandles, PartitionInstallUdfChildHandles, NULL @@ -306,9 +305,9 @@ PartitionDriverBindingStart ( if (BlockIo->Media->MediaPresent || (BlockIo->Media->RemovableMedia && !BlockIo->Media->LogicalPartition)) { // - // Try for GPT, then El Torito, then UDF, and then legacy MBR partition - // types. If the media supports a given partition type install child handles - // to represent the partitions described by the media. + // Try for GPT, then legacy MBR partition types, and then UDF and El Torito. + // If the media supports a given partition type install child handles to + // represent the partitions described by the media. // Routine = &mPartitionDetectRoutineTable[0]; while (*Routine != NULL) { diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c index 7eee748958..f6f0ff37d8 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c @@ -704,6 +704,23 @@ PartitionInstallUdfChildHandles ( } // + // Detect El Torito feature first. + // And always continue to search for UDF. + // + Status = PartitionInstallElToritoChildHandles ( + This, + Handle, + DiskIo, + DiskIo2, + BlockIo, + BlockIo2, + DevicePath + ); + if (!EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, "PartitionDxe: El Torito standard found on handle 0x%p.\n", Handle)); + } + + // // Search for an UDF file system on block device // Status = FindUdfFileSystem (BlockIo, DiskIo, &StartingLBA, &EndingLBA); -- 2.12.0.windows.1