1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[dev] add exception for SSDs sitting behind a VIA-Labs adapter

* Also adjust the sizes under and above which we consider a drive is UFD/HDD
This commit is contained in:
Pete Batard 2020-08-01 15:36:59 +01:00
parent 6f5ea5f88f
commit c2017ad659
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
4 changed files with 12 additions and 11 deletions

View file

@ -419,9 +419,9 @@ BOOL GetOpticalMedia(IMG_SAVE* img_save)
/* For debugging user reports of HDDs vs UFDs */
//#define FORCED_DEVICE
#ifdef FORCED_DEVICE
#define FORCED_VID 0x0781
#define FORCED_PID 0x5580
#define FORCED_NAME "SanDisk SSD U100 16GB 1 USB Device"
#define FORCED_VID 0x2109
#define FORCED_PID 0x0715
#define FORCED_NAME "KINGSTON SA400S37960 USB Device"
#endif
/*

View file

@ -168,6 +168,7 @@ static vid_score_t vid_score[] = {
{ 0x1f75, -2 }, // Innostor
{ 0x2001, -5 }, // Micov
{ 0x201e, -5 }, // Evdo
{ 0x2109, 10 }, // VIA Labs
{ 0x2188, -5 }, // SMI
{ 0x3538, -5 }, // PQI
{ 0x413c, -5 }, // Ameco

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.12.1692"
CAPTION "Rufus 3.12.1693"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -395,8 +395,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,12,1692,0
PRODUCTVERSION 3,12,1692,0
FILEVERSION 3,12,1693,0
PRODUCTVERSION 3,12,1693,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -414,13 +414,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.12.1692"
VALUE "FileVersion", "3.12.1693"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-3.12.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.12.1692"
VALUE "ProductVersion", "3.12.1693"
END
END
BLOCK "VarFileInfo"

View file

@ -432,7 +432,7 @@ BOOL SmartGetVersion(HANDLE hdevice)
* USB<->(S)ATA bridge seem to have their own method of implementing passthrough.
* - SSDs have also changed the deal completely, as you can get something that looks
* like Flash but that is really an HDD.
* - Some manufacturers (eg. verbatim) provide both USB Flash Drives and USB HDDs, so
* - Some manufacturers (eg. Verbatim) provide both USB Flash Drives and USB HDDs, so
* we can't exactly use the VID to say for sure what we're looking at.
* - Finally, Microsoft is absolutely no help either (which is kind of understandable
* from the above) => there is no magic API we can query that will tell us what we're
@ -451,9 +451,9 @@ int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid)
// Adjust the score depending on the size
drive_size = GetDriveSize(DriveIndex);
if (drive_size > 512*GB)
if (drive_size > 400 * GB)
score += 10;
else if (drive_size < 8*GB)
else if (drive_size < 32 * GB)
score -= 10;
// Check the string against well known HDD identifiers