mirror of
https://github.com/reactos/reactos.git
synced 2026-05-17 15:23:50 +08:00
[DISKPART] Use the MBR_MAGIC to check for a valid MBR
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
|
||||
#define PARTITION_TBL_SIZE 4
|
||||
|
||||
#define MBR_MAGIC 0xAA55
|
||||
|
||||
#include <pshpack1.h>
|
||||
|
||||
typedef struct _PARTITION
|
||||
@@ -870,7 +872,7 @@ AddDiskToList(
|
||||
DiskEntry->BiosFound = FALSE;
|
||||
|
||||
/* Check if this disk has a valid MBR */
|
||||
if (Mbr->BootCode[0] == 0 && Mbr->BootCode[1] == 0)
|
||||
if (Mbr->Magic != MBR_MAGIC)
|
||||
DiskEntry->NoMbr = TRUE;
|
||||
else
|
||||
DiskEntry->NoMbr = FALSE;
|
||||
|
||||
Reference in New Issue
Block a user