mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
[DISKPART] Use the MBR_MAGIC to check for a valid MBR
This commit is contained in:
parent
8972448127
commit
647d351278
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue