mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[misc] fix a potential WinPE 1.0 bug and improve ISO labels
* WinPE 1.x patch used rdisk(!) instead of rdisk(1) * Remove trailing spaces on ISO labels * Remove unnecessary comment during format
This commit is contained in:
		
							parent
							
								
									fd55a4ef0f
								
							
						
					
					
						commit
						94851dec7d
					
				
					 3 changed files with 12 additions and 10 deletions
				
			
		|  | @ -84,7 +84,7 @@ static BOOLEAN __stdcall FormatExCallback(FILE_SYSTEM_CALLBACK_COMMAND Command, | ||||||
| 		break; | 		break; | ||||||
| 	case FCC_DONE_WITH_STRUCTURE:	// We get this message when formatting Small FAT16
 | 	case FCC_DONE_WITH_STRUCTURE:	// We get this message when formatting Small FAT16
 | ||||||
| 		// pData Seems to be a struct with at least one (32 BIT!!!) string pointer to the size in MB
 | 		// pData Seems to be a struct with at least one (32 BIT!!!) string pointer to the size in MB
 | ||||||
| 		uprintf("Done with that sort of thing: Action=%d pData=%0p\n", Action, pData); | 		// uprintf("Done with that sort of thing: Action=%d pData=%0p\n", Action, pData);
 | ||||||
| 		// /!\ THE FOLLOWING ONLY WORKS ON VISTA OR LATER - DO NOT ENABLE ON XP!
 | 		// /!\ THE FOLLOWING ONLY WORKS ON VISTA OR LATER - DO NOT ENABLE ON XP!
 | ||||||
| 		// DumpBufferHex(pData, 8);
 | 		// DumpBufferHex(pData, 8);
 | ||||||
| 		// uprintf("Volume size: %s MB\n", (char*)(LONG_PTR)(*(ULONG32*)pData));
 | 		// uprintf("Volume size: %s MB\n", (char*)(LONG_PTR)(*(ULONG32*)pData));
 | ||||||
|  | @ -679,7 +679,7 @@ static BOOL SetupWinPE(char drive_letter) | ||||||
| 			// rdisk(0) -> rdisk(#) disk masquerading
 | 			// rdisk(0) -> rdisk(#) disk masquerading
 | ||||||
| 			// NB: only the first one seems to be needed
 | 			// NB: only the first one seems to be needed
 | ||||||
| 			if (safe_strnicmp(&buf[i], rdisk_zero, strlen(rdisk_zero)-1) == 0) { | 			if (safe_strnicmp(&buf[i], rdisk_zero, strlen(rdisk_zero)-1) == 0) { | ||||||
| 				buf[i+6] = 0x20 + ComboBox_GetCurSel(hDiskID); | 				buf[i+6] = 0x30 + ComboBox_GetCurSel(hDiskID); | ||||||
| 				uprintf("  0x%08X: '%s' -> 'rdisk(%c)'\n", i, rdisk_zero, buf[i+6]); | 				uprintf("  0x%08X: '%s' -> 'rdisk(%c)'\n", i, rdisk_zero, buf[i+6]); | ||||||
| 			} | 			} | ||||||
| 			// $WIN_NT$_~BT -> i386
 | 			// $WIN_NT$_~BT -> i386
 | ||||||
|  |  | ||||||
|  | @ -374,6 +374,7 @@ out: | ||||||
| BOOL ExtractISO(const char* src_iso, const char* dest_dir, bool scan) | BOOL ExtractISO(const char* src_iso, const char* dest_dir, bool scan) | ||||||
| { | { | ||||||
| 	size_t i; | 	size_t i; | ||||||
|  | 	int j; | ||||||
| 	FILE* fd; | 	FILE* fd; | ||||||
| 	BOOL r = FALSE; | 	BOOL r = FALSE; | ||||||
| 	iso9660_t* p_iso = NULL; | 	iso9660_t* p_iso = NULL; | ||||||
|  | @ -457,6 +458,9 @@ try_iso: | ||||||
| out: | out: | ||||||
| 	iso_blocking_status = -1; | 	iso_blocking_status = -1; | ||||||
| 	if (scan_only) { | 	if (scan_only) { | ||||||
|  | 		// Remove trailing spaces from the label
 | ||||||
|  | 		for (j=safe_strlen(iso_report.label)-1; ((j>=0)&&(isspace(iso_report.label[j]))); j--) | ||||||
|  | 			iso_report.label[j] = 0; | ||||||
| 		// We use the fact that UDF_BLOCKSIZE and ISO_BLOCKSIZE are the same here
 | 		// We use the fact that UDF_BLOCKSIZE and ISO_BLOCKSIZE are the same here
 | ||||||
| 		iso_report.projected_size = total_blocks * ISO_BLOCKSIZE; | 		iso_report.projected_size = total_blocks * ISO_BLOCKSIZE; | ||||||
| 		// We will link the existing isolinux.cfg from a syslinux.cfg we create
 | 		// We will link the existing isolinux.cfg from a syslinux.cfg we create
 | ||||||
|  | @ -546,7 +550,6 @@ BOOL ExtractISOFile(const char* iso, const char* iso_file, const char* dest_file | ||||||
| 	p_udf = udf_open(iso); | 	p_udf = udf_open(iso); | ||||||
| 	if (p_udf == NULL) | 	if (p_udf == NULL) | ||||||
| 		goto try_iso; | 		goto try_iso; | ||||||
| 	uprintf("Disc image is an UDF image\n"); |  | ||||||
| 
 | 
 | ||||||
| 	p_udf_root = udf_get_root(p_udf, true, 0); | 	p_udf_root = udf_get_root(p_udf, true, 0); | ||||||
| 	if (p_udf_root == NULL) { | 	if (p_udf_root == NULL) { | ||||||
|  | @ -583,7 +586,6 @@ try_iso: | ||||||
| 		uprintf("Unable to open image '%s'.\n", iso); | 		uprintf("Unable to open image '%s'.\n", iso); | ||||||
| 		goto out; | 		goto out; | ||||||
| 	} | 	} | ||||||
| 	uprintf("Disc image is an ISO9660 image\n"); |  | ||||||
| 
 | 
 | ||||||
| 	p_statbuf = iso9660_ifs_stat_translate(p_iso, iso_file); | 	p_statbuf = iso9660_ifs_stat_translate(p_iso, iso_file); | ||||||
| 	if (p_statbuf == NULL) { | 	if (p_statbuf == NULL) { | ||||||
|  |  | ||||||
							
								
								
									
										12
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -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.2.0.179" | CAPTION "Rufus v1.2.0.180" | ||||||
| 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 | ||||||
|  | @ -77,7 +77,7 @@ BEGIN | ||||||
|     DEFPUSHBUTTON   "OK",IDOK,231,175,50,14,WS_GROUP |     DEFPUSHBUTTON   "OK",IDOK,231,175,50,14,WS_GROUP | ||||||
|     CONTROL         "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL, |     CONTROL         "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL, | ||||||
|                     "SysLink",WS_TABSTOP,46,47,114,9 |                     "SysLink",WS_TABSTOP,46,47,114,9 | ||||||
|     LTEXT           "Version 1.2.0 (Build 179)",IDC_STATIC,46,19,78,8 |     LTEXT           "Version 1.2.0 (Build 180)",IDC_STATIC,46,19,78,8 | ||||||
|     PUSHBUTTON      "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP |     PUSHBUTTON      "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP | ||||||
|     EDITTEXT        IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL |     EDITTEXT        IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL | ||||||
|     LTEXT           "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8 |     LTEXT           "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8 | ||||||
|  | @ -237,8 +237,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 1,2,0,179 |  FILEVERSION 1,2,0,180 | ||||||
|  PRODUCTVERSION 1,2,0,179 |  PRODUCTVERSION 1,2,0,180 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -255,13 +255,13 @@ BEGIN | ||||||
|         BEGIN |         BEGIN | ||||||
|             VALUE "CompanyName", "akeo.ie" |             VALUE "CompanyName", "akeo.ie" | ||||||
|             VALUE "FileDescription", "Rufus" |             VALUE "FileDescription", "Rufus" | ||||||
|             VALUE "FileVersion", "1.2.0.179" |             VALUE "FileVersion", "1.2.0.180" | ||||||
|             VALUE "InternalName", "Rufus" |             VALUE "InternalName", "Rufus" | ||||||
|             VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)" |             VALUE "LegalCopyright", "© 2011 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.2.0.179" |             VALUE "ProductVersion", "1.2.0.180" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue