[edk2-devel] [PATCH V2 2/3] MdeModulePkg/PartitionDxe: Skip the MBR that add for CD-ROM

Gao, Zhichao zhichao.gao at intel.com
Mon Jul 13 08:14:30 UTC 2020



> -----Original Message-----
> From: Ni, Ray <ray.ni at intel.com>
> Sent: Monday, July 13, 2020 2:45 PM
> To: Gao, Zhichao <zhichao.gao at intel.com>; devel at edk2.groups.io
> Cc: Wu, Hao A <hao.a.wu at intel.com>; Laszlo Ersek <lersek at redhat.com>
> Subject: RE: [PATCH V2 2/3] MdeModulePkg/PartitionDxe: Skip the MBR that add
> for CD-ROM
> 
> > +    //
> > +    // If the MBR with partition entry contains itself, i.e. start with LBA0,
> > +    // and have the same size with the media, we treat it as a El Torito partition.
> > +    //
> > +    if ((StartingLBA == 0) &&
> > +        (SizeInLBA != 0) &&
> 1. Can this check "SizeInLBA != 0" be removed?

Yes. I don't think the LastLBA would be the max UINT64 value. So we can remove this condition.

> 
> > +      DEBUG ((DEBUG_INFO, "PartitionValidMbr: The MBR table has partition
> > entry start at sector 0.\n"));
> 2. Can the debug message be refined as below?
> " PartitionValidMbr: MBR table has partition entry covering the ENTIRE disk.
> Don't treat it as a valid MBR."

Sure. Your suggestion make the change more clear. I would change this in the comment of the section as well.

Thanks,
Zhichao


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62407): https://edk2.groups.io/g/devel/message/62407
Mute This Topic: https://groups.io/mt/75369398/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list