]> git.dujemihanovic.xyz Git - u-boot.git/commit
disk: dos: Infer MBR partition sector size from underlying drive sector size
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 13 Aug 2023 23:48:45 +0000 (01:48 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 22 Aug 2023 19:17:52 +0000 (15:17 -0400)
commite2b5cc608b23418d5bcd5e2fe0b5d93593d02e97
treef3a78e90fa17789164827111b166804ad3cea042
parent3f9cff669bbc4ed48ede1705fbaf671f3f4ce0e1
disk: dos: Infer MBR partition sector size from underlying drive sector size

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@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
disk/part_dos.c