[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;
int i, j;
static const char* ignore_device[] = { "\\Device\\CdRom", "\\Device\\Floppy" };
static const char* volume_start = "\\\\?\\";
CheckDriveIndex(DriveIndex);
@ -148,7 +149,7 @@ char* GetLogicalName(DWORD DriveIndex, BOOL bKeepTrailingBackslash)
// Sanity checks
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);
continue;
}

View File

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

View File

@ -125,8 +125,9 @@ static __inline BOOL check_iso_props(const char* psz_dirname, BOOL* is_syslinux_
if (scan_only) {
// Check for a "bootmgr(.efi)" file in root (psz_path = "")
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;
}
if (safe_stricmp(psz_basename, bootmgr_efi_name) == 0) {
iso_report.has_win7_efi = TRUE;
}

View File

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