From 9aa308213dd75fb07cf3919d48cd5a7974eac7dc Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 9 May 2014 21:57:27 +0100 Subject: [PATCH] [core] fix UEFI bootable DD images * A DD image may have a zeroed MBR, yet be bootable through UEFI * Also improve AnalyzePBR() * Closes #320 --- src/drive.c | 64 +++++++++++++++++++++++++++------------------------- src/rufus.rc | 12 +++++----- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/src/drive.c b/src/drive.c index 4d5132bf..58bede0b 100644 --- a/src/drive.c +++ b/src/drive.c @@ -505,17 +505,17 @@ BOOL IsMediaPresent(DWORD DriveIndex) return r; } -const struct {int (*fn)(FILE *fp); char* str; BOOL bootable;} known_mbr[] = { - { is_dos_mbr, "DOS/NT/95A", TRUE }, - { is_dos_f2_mbr, "DOS/NT/95A (F2)", TRUE }, - { is_95b_mbr, "Windows 95B/98/98SE/ME", TRUE }, - { is_2000_mbr, "Windows 2000/XP/2003", TRUE }, - { is_vista_mbr, "Windows Vista", TRUE }, - { is_win7_mbr, "Windows 7", TRUE }, - { is_rufus_mbr, "Rufus", TRUE }, - { is_syslinux_mbr, "Syslinux", TRUE }, - { is_reactos_mbr, "Reactos", TRUE }, - { is_zero_mbr, "Zeroed", FALSE }, +const struct {int (*fn)(FILE *fp); char* str;} known_mbr[] = { + { is_dos_mbr, "DOS/NT/95A" }, + { is_dos_f2_mbr, "DOS/NT/95A (F2)" }, + { is_95b_mbr, "Windows 95B/98/98SE/ME" }, + { is_2000_mbr, "Windows 2000/XP/2003" }, + { is_vista_mbr, "Windows Vista" }, + { is_win7_mbr, "Windows 7" }, + { is_rufus_mbr, "Rufus" }, + { is_syslinux_mbr, "Syslinux" }, + { is_reactos_mbr, "Reactos" }, + { is_zero_mbr, "Zeroed" }, }; // Returns TRUE if the drive seems bootable, FALSE otherwise @@ -535,7 +535,7 @@ BOOL AnalyzeMBR(HANDLE hPhysicalDrive, const char* TargetName) for (i=0; i