[PATCH v2] disk: part_dos: update partition table entries after write

Marek Szyprowski m.szyprowski at samsung.com
Thu Jan 28 09:18:37 CET 2021


Hi,

On 28.01.2021 09:10, Gary Bisson wrote:
> Fixes issues when switching from GPT to MBR partition tables.
>
> Signed-off-by: Gary Bisson <gary.bisson at boundarydevices.com>
Acked-by: Marek Szyprowski <m.szyprowski at samsung.com>
> ---
> Changes for v2:
> - added part_init() inside write_mbr_partitions(), as suggested by
>    Heinrich
> ---
>   disk/part_dos.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/disk/part_dos.c b/disk/part_dos.c
> index f431925745c..60addc6e00d 100644
> --- a/disk/part_dos.c
> +++ b/disk/part_dos.c
> @@ -423,6 +423,9 @@ int write_mbr_partitions(struct blk_desc *dev,
>   		ext_part_sect = next_ebr;
>   	}
>   
> +	/* Update the partition table entries*/
> +	part_init(dev_desc);
> +
>   	return 0;
>   }
>   
> @@ -499,6 +502,9 @@ int write_mbr_sector(struct blk_desc *dev_desc, void *buf)
>   		return 1;
>   	}
>   
> +	/* Update the partition table entries*/
> +	part_init(dev_desc);
> +
>   	return 0;
>   }
>   

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland



More information about the U-Boot mailing list