+
+ // DiskEntry->NoMbr = (Mbr->Magic != PARTITION_MAGIC || (*(PUSHORT)Mbr->BootCode) == 0x0000);
+
+ /* If we have not the 0xAA55 then it's raw partition */
+ if (Mbr->Magic != PARTITION_MAGIC)
+ {
+ DiskEntry->DiskStyle = PARTITION_STYLE_RAW;
+ }
+ /* Check partitions types: if first is 0xEE and all the others 0, we have GPT */
+ else if (Mbr->Partition[0].PartitionType == EFI_PMBR_OSTYPE_EFI &&
+ Mbr->Partition[1].PartitionType == 0 &&
+ Mbr->Partition[2].PartitionType == 0 &&
+ Mbr->Partition[3].PartitionType == 0)
+ {
+ DiskEntry->DiskStyle = PARTITION_STYLE_GPT;
+ }
+ /* Otherwise, partition table is in MBR */