disk: part_dos: update partition table entries after write
authorGary Bisson <gary.bisson@boundarydevices.com>
Thu, 28 Jan 2021 08:10:07 +0000 (09:10 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 1 Feb 2021 21:32:06 +0000 (16:32 -0500)
Fixes issues when switching from GPT to MBR partition tables.

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
disk/part_dos.c

index f431925745c1c568890c8e48fa22a51c169f6b23..60addc6e00d43f473c91cbad5d289bae768f6f3a 100644 (file)
@@ -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;
 }