[edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-15 Thread Gary Lin
In some cases, such as MD RAID1 in Linux, the bootloader may be in a nested EFI system partition partition. For example, sda1 and sdb1 are combined as md0 and the first partition of md0, md0p1, is an EFI system partition. Then, the bootloader can be located by the following device paths: PCI()/SAT

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-15 Thread Laszlo Ersek
On 01/15/19 10:45, Gary Lin wrote: > In some cases, such as MD RAID1 in Linux, the bootloader may be in a > nested EFI system partition partition. For example, sda1 and sdb1 are > combined as md0 and the first partition of md0, md0p1, is an EFI system > partition. Then, the bootloader can be locate

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-15 Thread Gary Lin
On Tue, Jan 15, 2019 at 12:58:10PM +0100, Laszlo Ersek wrote: > On 01/15/19 10:45, Gary Lin wrote: > > In some cases, such as MD RAID1 in Linux, the bootloader may be in a > > nested EFI system partition partition. For example, sda1 and sdb1 are > > combined as md0 and the first partition of md0, m

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-16 Thread Laszlo Ersek
On 01/16/19 03:16, Gary Lin wrote: > On Tue, Jan 15, 2019 at 12:58:10PM +0100, Laszlo Ersek wrote: >> On 01/15/19 10:45, Gary Lin wrote: >>> In some cases, such as MD RAID1 in Linux, the bootloader may be in a >>> nested EFI system partition partition. For example, sda1 and sdb1 are >>> combined as

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-22 Thread Ni, Ray
(Send again. Previous mail might be lost.) Gary, I have two comments: 1. Do you need to consider the case when the multiple partition nodes might not be adjacent? 2. Maybe you could recursively call the function itself instead of using a loop. In this new way, you might be able to save some code.

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-22 Thread Gary Lin
On Tue, Jan 22, 2019 at 04:01:57PM +, Ni, Ray wrote: > (Send again. Previous mail might be lost.) > Gary, Hi Ray, > I have two comments: > 1. Do you need to consider the case when the multiple partition nodes might > not be adjacent? In my cases, they are all partitions based on another parti

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-22 Thread Ni, Ray
> -Original Message- > From: Gary Lin > Sent: Wednesday, January 23, 2019 10:13 AM > To: Ni, Ray > Cc: edk2-devel@lists.01.org; Zeng, Star ; Wang, Jian J > ; Wu, Hao A > Subject: Re: [PATCH] MdeModulePkg/UefiBootManagerLib: Match the > nested partitions > > On Tue, Jan 22, 2019 at 04

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-22 Thread Ni, Ray
> -Original Message- > From: Ni, Ray > Sent: Wednesday, January 23, 2019 11:48 AM > To: 'Gary Lin' > Cc: edk2-devel@lists.01.org; Zeng, Star ; Wang, Jian J > ; Wu, Hao A > Subject: RE: [PATCH] MdeModulePkg/UefiBootManagerLib: Match the > nested partitions > > > > > -Original Mes

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-22 Thread Gary Lin
On Wed, Jan 23, 2019 at 03:49:16AM +, Ni, Ray wrote: > > > > -Original Message- > > From: Ni, Ray > > Sent: Wednesday, January 23, 2019 11:48 AM > > To: 'Gary Lin' > > Cc: edk2-devel@lists.01.org; Zeng, Star ; Wang, Jian J > > ; Wu, Hao A > > Subject: RE: [PATCH] MdeModulePkg/UefiBo