[PATCH] disk: dos: Infer MBR partition sector size from underlying drive sector size

Simon Glass sjg at chromium.org
Tue Aug 15 00:43:00 CEST 2023


On Sun, 13 Aug 2023 at 17:49, Marek Vasut
<marek.vasut+renesas at mailbox.org> wrote:
>
> Block devices with 4k sectors imply the MBR sectors are also 4k instead
> of regular 512B. Avoid hard-coding the 512B sector size and isntead read
> the current block device sector size from it, and if the sector size is
> larger than 512B, use the block device sector size.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> ---
> Cc: Simon Glass <sjg at chromium.org>
> ---
>  disk/part_dos.c | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list