]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/sd/sdcard: Refactor sd_bootpart_offset
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 1 Sep 2025 05:56:24 +0000 (07:56 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 2 Sep 2025 15:58:05 +0000 (17:58 +0200)
commite2d7c1a3cdc46d6b2e8afa8db8a7ef4c2740a2fe
tree6a274d06e6166bf5277b6ff6ad99557d1e5efc7a
parent79d472a51015f9c9ab341a5f56b8c450870c006b
hw/sd/sdcard: Refactor sd_bootpart_offset

This function provides the offset for any partition in the block image,
not only the boot partitions, therefore rename it. Align the constant
names with the numbering scheme in the standard and use constants for
both boot partitions for consistency reasons. There is also no reason to
return early if boot_part_size is zero because the existing code will
provide the right value in that case as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <66e9b07476aad61820c4f42f4f984cc90752ba5e.1756706188.git.jan.kiszka@siemens.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/sd/sd.c
hw/sd/sdmmc-internal.h