瀏覽代碼

disk: part_dos: update partition table entries after write

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>
Gary Bisson 3 年之前
父節點
當前提交
f14c5ee5ab
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      disk/part_dos.c

+ 6 - 0
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;
 }