[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;
}