https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a59cecd89ddfd7e4b84e57032538fd915a2d468d
commit a59cecd89ddfd7e4b84e57032538fd915a2d468d Author: Hermès Bélusca-Maïto <[email protected]> AuthorDate: Tue Nov 24 04:34:56 2020 +0100 Commit: Hermès Bélusca-Maïto <[email protected]> CommitDate: Tue Nov 24 04:37:52 2020 +0100 [SETUPLIB] Add two hacks in partlist.c for temporarily setting consistently the disk partition style. Add two hacks in UpdateDiskLayout() and WritePartitions() so that the disk partition style is consistently set to a known value MBR, especially when that disk was previously new and uninitialized (RAW). A proper fix will be developed later when support for GPT is added. --- base/setup/lib/utils/partlist.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/setup/lib/utils/partlist.c b/base/setup/lib/utils/partlist.c index 6682f0a36a8..008dd9947a9 100644 --- a/base/setup/lib/utils/partlist.c +++ b/base/setup/lib/utils/partlist.c @@ -2881,6 +2881,9 @@ UpdateDiskLayout( } } + // HACK: See the FIXMEs in WritePartitions(): (Re)set the PartitionStyle to MBR. + DiskEntry->DiskStyle = PARTITION_STYLE_MBR; + DiskEntry->Dirty = TRUE; #ifdef DUMP_PARTITION_TABLE @@ -3926,6 +3929,9 @@ WritePartitions( // DiskEntry->NoMbr was TRUE (instead of NewDisk). // + // HACK: Parts of FIXMEs described above: (Re)set the PartitionStyle to MBR. + DiskEntry->DiskStyle = PARTITION_STYLE_MBR; + /* The layout has been successfully updated, the disk is not dirty anymore */ DiskEntry->Dirty = FALSE;
