From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=65.50.211.136; helo=terminus.zytor.com; envelope-from=pcacjr@zytor.com; receiver=edk2-devel@lists.01.org Received: from terminus.zytor.com (terminus.zytor.com [65.50.211.136]) (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 3CF8121A134A8 for ; Thu, 16 Nov 2017 14:22:30 -0800 (PST) Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id vAGMPb0M015453; Thu, 16 Nov 2017 14:25:37 -0800 Received: (from apache@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id vAGMPanT015443; Thu, 16 Nov 2017 20:25:36 -0200 X-Authentication-Warning: terminus.zytor.com: apache set sender to pcacjr@zytor.com using -f Received: from 201.47.212.245 (SquirrelMail authenticated user pcacjr) by www.zytor.com with HTTP; Thu, 16 Nov 2017 20:25:37 -0200 Message-ID: <050be520976d3fa927d8ac462bf7126a.squirrel@www.zytor.com> In-Reply-To: <20171116074742.15024-2-hao.a.wu@intel.com> References: <20171116074742.15024-1-hao.a.wu@intel.com> <20171116074742.15024-2-hao.a.wu@intel.com> Date: Thu, 16 Nov 2017 20:25:37 -0200 From: "Paulo Alcantara" To: "Hao Wu" Cc: edk2-devel@lists.01.org, "Hao Wu" , "Paulo Alcantara" , "Ruiyu Ni" , "Star Zeng" , "Eric Dong" User-Agent: SquirrelMail/1.4.22-19.fc24 MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Subject: Re: [PATCH v2 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: Thu, 16 Nov 2017 22:22:30 -0000 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit On Thu, November 16, 2017 5:47 am, Hao Wu wrote: > 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 | 27 > ++++++++++++++++++-- > 2 files changed, 28 insertions(+), 6 deletions(-) Reviewed-by: Paulo Alcantara Thanks! Paulo > > 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..5aac5640f6 100644 > --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c > +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c > @@ -688,8 +688,10 @@ PartitionInstallUdfChildHandles ( > EFI_PARTITION_INFO_PROTOCOL PartitionInfo; > EFI_LBA StartingLBA; > EFI_LBA EndingLBA; > + BOOLEAN ChildCreated; > > Media = BlockIo->Media; > + ChildCreated = FALSE; > > // > // Check if UDF logical block size is multiple of underlying device > block size > @@ -704,11 +706,29 @@ 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)); > + ChildCreated = TRUE; > + } > + > + // > // Search for an UDF file system on block device > // > Status = FindUdfFileSystem (BlockIo, DiskIo, &StartingLBA, &EndingLBA); > if (EFI_ERROR (Status)) { > - return EFI_NOT_FOUND; > + return (ChildCreated ? EFI_SUCCESS : EFI_NOT_FOUND); > } > > // > @@ -735,6 +755,9 @@ PartitionInstallUdfChildHandles ( > EndingLBA, > Media->BlockSize > ); > + if (EFI_ERROR (Status)) { > + return (ChildCreated ? EFI_SUCCESS : Status); > + } > > - return Status; > + return EFI_SUCCESS; > } > -- > 2.12.0.windows.1 > > -- Paulo Alcantara, HP Inc. Speaking for myself only.