1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[iso] fix broken bootmgr detection

* Closes #144
* Also fix broken WDK compilation
This commit is contained in:
Pete Batard 2013-05-19 23:02:16 +01:00
parent 199b9f4869
commit 26f807530d
4 changed files with 9 additions and 8 deletions

View file

@ -127,6 +127,7 @@ char* GetLogicalName(DWORD DriveIndex, BOOL bKeepTrailingBackslash)
UINT drive_type; UINT drive_type;
int i, j; int i, j;
static const char* ignore_device[] = { "\\Device\\CdRom", "\\Device\\Floppy" }; static const char* ignore_device[] = { "\\Device\\CdRom", "\\Device\\Floppy" };
static const char* volume_start = "\\\\?\\";
CheckDriveIndex(DriveIndex); CheckDriveIndex(DriveIndex);
@ -148,7 +149,7 @@ char* GetLogicalName(DWORD DriveIndex, BOOL bKeepTrailingBackslash)
// Sanity checks // Sanity checks
len = safe_strlen(volume_name); len = safe_strlen(volume_name);
if ((len <= 1) || (safe_strnicmp(volume_name, "\\\\?\\", 4) != 0) || (volume_name[len-1] != '\\')) { if ((len <= 1) || (safe_strnicmp(volume_name, volume_start, 4) != 0) || (volume_name[len-1] != '\\')) {
uprintf("'%s' is not a GUID volume name\n", volume_name); uprintf("'%s' is not a GUID volume name\n", volume_name);
continue; continue;
} }

View file

@ -275,7 +275,6 @@ static void ToValidLabel(WCHAR* name, BOOL bFAT)
* ----- * -----
* 1d02h * 1d02h
*/ */
// TODO: use that for Format "classic"
static DWORD GetVolumeID(void) static DWORD GetVolumeID(void)
{ {
SYSTEMTIME s; SYSTEMTIME s;

View file

@ -125,8 +125,9 @@ static __inline BOOL check_iso_props(const char* psz_dirname, BOOL* is_syslinux_
if (scan_only) { if (scan_only) {
// Check for a "bootmgr(.efi)" file in root (psz_path = "") // Check for a "bootmgr(.efi)" file in root (psz_path = "")
if (*psz_dirname == 0) { if (*psz_dirname == 0) {
if (safe_strnicmp(psz_basename, bootmgr_efi_name, sizeof(bootmgr_efi_name)-4) == 0) if (safe_strnicmp(psz_basename, bootmgr_efi_name, safe_strlen(bootmgr_efi_name)-5) == 0) {
iso_report.has_bootmgr = TRUE; iso_report.has_bootmgr = TRUE;
}
if (safe_stricmp(psz_basename, bootmgr_efi_name) == 0) { if (safe_stricmp(psz_basename, bootmgr_efi_name) == 0) {
iso_report.has_win7_efi = TRUE; iso_report.has_win7_efi = TRUE;
} }

View file

@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 316 IDD_DIALOG DIALOGEX 12, 12, 206, 316
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.3.3.242" CAPTION "Rufus v1.3.3.243"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,278,50,14 DEFPUSHBUTTON "Start",IDC_START,94,278,50,14
@ -274,8 +274,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,3,3,242 FILEVERSION 1,3,3,243
PRODUCTVERSION 1,3,3,242 PRODUCTVERSION 1,3,3,243
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -292,13 +292,13 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.3.3.242" VALUE "FileVersion", "1.3.3.243"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "(c) 2011-2013 Pete Batard (GPL v3)" VALUE "LegalCopyright", "(c) 2011-2013 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe" VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.3.3.242" VALUE "ProductVersion", "1.3.3.243"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"