mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 19:27:03 -04:00
[ntfs] fix creation of Windows 7 bootable USB from XP
* When using Win7 installation ISOs, XP would return the error: [0x00000456] The media in the drive may have changed * This seems to be due to unmounting of the drive before writing the PBR * Also, our ms-sys/NTFS code wasn't identifying NTFS properly on XP
This commit is contained in:
parent
352a796eff
commit
b03065b1f5
3 changed files with 12 additions and 14 deletions
|
@ -25,9 +25,9 @@
|
|||
|
||||
int is_ntfs_fs(FILE *fp)
|
||||
{
|
||||
char *szMagic = "NTFS";
|
||||
unsigned char aucMagic[] = {'N','T','F','S',' ',' ',' ',' '};
|
||||
|
||||
return contains_data(fp, 0x6F, szMagic, strlen(szMagic));
|
||||
return contains_data(fp, 0x03, aucMagic, sizeof(aucMagic));
|
||||
} /* is_ntfs_fs */
|
||||
|
||||
int is_ntfs_br(FILE *fp)
|
||||
|
@ -35,7 +35,7 @@ int is_ntfs_br(FILE *fp)
|
|||
/* A "file" is probably some kind of NTFS boot record if it contains the
|
||||
magic chars 0x55, 0xAA at positions 0x1FE */
|
||||
unsigned char aucRef[] = {0x55, 0xAA};
|
||||
unsigned char aucMagic[] = {'N','T','F','S','0','0','0','0'};
|
||||
unsigned char aucMagic[] = {'N','T','F','S',' ',' ',' ',' '};
|
||||
|
||||
if( ! contains_data(fp, 0x1FE, aucRef, sizeof(aucRef)))
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue