mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[core] fix a bug with hub assignation
* Also improve detection for OCZ UFDs * Closes #596
This commit is contained in:
		
							parent
							
								
									249d1adcbd
								
							
						
					
					
						commit
						c45ff77b55
					
				
					 3 changed files with 13 additions and 14 deletions
				
			
		|  | @ -60,7 +60,6 @@ static str_score_t str_score[] = { | ||||||
| 	{ "MX#", 10 }, | 	{ "MX#", 10 }, | ||||||
| 	{ "WDC", 10 }, | 	{ "WDC", 10 }, | ||||||
| 	{ "IBM", 10 }, | 	{ "IBM", 10 }, | ||||||
| 	{ "OCZ", 5 }, |  | ||||||
| 	{ "STM#", 10 }, | 	{ "STM#", 10 }, | ||||||
| 	{ "HDS#", 10 },		// These Hitachi drives are a PITA
 | 	{ "HDS#", 10 },		// These Hitachi drives are a PITA
 | ||||||
| 	{ "HDP#", 10 }, | 	{ "HDP#", 10 }, | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | ||||||
| 
 | 
 | ||||||
| IDD_DIALOG DIALOGEX 12, 12, 242, 376 | IDD_DIALOG DIALOGEX 12, 12, 242, 376 | ||||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||||
| CAPTION "Rufus 2.4.736" | CAPTION "Rufus 2.4.737" | ||||||
| FONT 8, "Segoe UI Symbol", 400, 0, 0x0 | FONT 8, "Segoe UI Symbol", 400, 0, 0x0 | ||||||
| BEGIN | BEGIN | ||||||
|     LTEXT           "Device",IDS_DEVICE_TXT,9,6,200,8 |     LTEXT           "Device",IDS_DEVICE_TXT,9,6,200,8 | ||||||
|  | @ -317,8 +317,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 2,4,736,0 |  FILEVERSION 2,4,737,0 | ||||||
|  PRODUCTVERSION 2,4,736,0 |  PRODUCTVERSION 2,4,737,0 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -335,13 +335,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", "2.4.736" |             VALUE "FileVersion", "2.4.737" | ||||||
|             VALUE "InternalName", "Rufus" |             VALUE "InternalName", "Rufus" | ||||||
|             VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)" |             VALUE "LegalCopyright", "© 2011-2015 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", "2.4.736" |             VALUE "ProductVersion", "2.4.737" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
							
								
								
									
										16
									
								
								src/usb.c
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								src/usb.c
									
										
									
									
									
								
							|  | @ -137,9 +137,9 @@ static __inline BOOL IsVHD(const char* buffer) | ||||||
| /* For debugging user reports of HDDs vs UFDs */ | /* For debugging user reports of HDDs vs UFDs */ | ||||||
| //#define FORCED_DEVICE
 | //#define FORCED_DEVICE
 | ||||||
| #ifdef FORCED_DEVICE | #ifdef FORCED_DEVICE | ||||||
| #define FORCED_VID 0x090c | #define FORCED_VID 0x0930 | ||||||
| #define FORCED_PID 0x1000 | #define FORCED_PID 0x6544 | ||||||
| #define FORCED_NAME "Samsung Flash Drive USB Device" | #define FORCED_NAME "TOSHIBA TransMemory USB Device" | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  | @ -330,15 +330,15 @@ BOOL GetUSBDevices(DWORD devnum) | ||||||
| 
 | 
 | ||||||
| 					// Try to parse the current device_id string for VID:PID
 | 					// Try to parse the current device_id string for VID:PID
 | ||||||
| 					// We'll use that if we can't get anything better
 | 					// We'll use that if we can't get anything better
 | ||||||
| 					for (j = 0, k = 0; (j<strlen(device_id)) && (k<2); j++) { | 					for (k = 0, l = 0; (k<strlen(device_id)) && (l<2); k++) { | ||||||
| 						// The ID is in the form USB_VENDOR_BUSID\VID_xxxx&PID_xxxx\...
 | 						// The ID is in the form USB_VENDOR_BUSID\VID_xxxx&PID_xxxx\...
 | ||||||
| 						if (device_id[j] == '\\') | 						if (device_id[k] == '\\') | ||||||
| 							post_backslash = TRUE; | 							post_backslash = TRUE; | ||||||
| 						if (!post_backslash) | 						if (!post_backslash) | ||||||
| 							continue; | 							continue; | ||||||
| 						if (device_id[j] == '_') { | 						if (device_id[k] == '_') { | ||||||
| 							props.pid = (uint16_t)strtoul(&device_id[j + 1], NULL, 16); | 							props.pid = (uint16_t)strtoul(&device_id[k + 1], NULL, 16); | ||||||
| 							if (k++ == 0) | 							if (l++ == 0) | ||||||
| 								props.vid = props.pid; | 								props.vid = props.pid; | ||||||
| 						} | 						} | ||||||
| 					} | 					} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue