mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-08 10:22:30 -04:00
[core] ReFS improvements
* Allow 4K/64K cluster size selection * Only enable ReFS on relevant platforms * Also recognize a few more Windows editions
This commit is contained in:
parent
32b083e535
commit
05382d8c7d
5 changed files with 62 additions and 18 deletions
17
src/stdfn.c
17
src/stdfn.c
|
@ -34,8 +34,9 @@
|
|||
|
||||
#include "settings.h"
|
||||
|
||||
int nWindowsVersion = WINDOWS_UNDEFINED;
|
||||
int nWindowsBuildNumber = -1;
|
||||
int nWindowsVersion = WINDOWS_UNDEFINED;
|
||||
int nWindowsBuildNumber = -1;
|
||||
int nWindowsEdition = 0;
|
||||
char WindowsVersionStr[128] = "Windows ";
|
||||
|
||||
/*
|
||||
|
@ -279,6 +280,10 @@ static const char* GetEdition(DWORD ProductType)
|
|||
case 0x00000048: return "Enterprise Eval";
|
||||
case 0x00000054: return "Enterprise N Eval";
|
||||
case 0x00000057: return "Thin PC";
|
||||
case 0x00000058: case 0x00000059: case 0x0000005A: case 0x0000005B: case 0x0000005C: return "Embedded";
|
||||
case 0x00000065: return "Core";
|
||||
case 0x00000067: return "Professional WMC";
|
||||
case 0x00000069: case 0x0000006A: case 0x0000006B: case 0x0000006C: return "Embedded";
|
||||
case 0x0000006F: return "Core Connected";
|
||||
case 0x00000070: return "Pro Student";
|
||||
case 0x00000071: return "Core Connected N";
|
||||
|
@ -321,7 +326,7 @@ static const char* GetEdition(DWORD ProductType)
|
|||
void GetWindowsVersion(void)
|
||||
{
|
||||
OSVERSIONINFOEXA vi, vi2;
|
||||
DWORD dwProductType;
|
||||
DWORD dwProductType = 0;
|
||||
const char* w = 0;
|
||||
const char* w64 = "32 bit";
|
||||
char *vptr;
|
||||
|
@ -419,7 +424,7 @@ void GetWindowsVersion(void)
|
|||
vptr = &WindowsVersionStr[sizeof("Windows ") - 1];
|
||||
vlen = sizeof(WindowsVersionStr) - sizeof("Windows ") - 1;
|
||||
if (!w)
|
||||
safe_sprintf(vptr, vlen, "%s %u.%u %s", (vi.dwPlatformId==VER_PLATFORM_WIN32_NT?"NT":"??"),
|
||||
safe_sprintf(vptr, vlen, "%s %u.%u %s", (vi.dwPlatformId == VER_PLATFORM_WIN32_NT ? "NT" : "??"),
|
||||
(unsigned)vi.dwMajorVersion, (unsigned)vi.dwMinorVersion, w64);
|
||||
else if (vi.wServicePackMinor)
|
||||
safe_sprintf(vptr, vlen, "%s SP%u.%u %s", w, vi.wServicePackMajor, vi.wServicePackMinor, w64);
|
||||
|
@ -427,7 +432,9 @@ void GetWindowsVersion(void)
|
|||
safe_sprintf(vptr, vlen, "%s SP%u %s", w, vi.wServicePackMajor, w64);
|
||||
else
|
||||
safe_sprintf(vptr, vlen, "%s%s%s, %s",
|
||||
w, (dwProductType != PRODUCT_UNDEFINED) ? " " : "", GetEdition(dwProductType), w64);
|
||||
w, (dwProductType != 0) ? " " : "", GetEdition(dwProductType), w64);
|
||||
|
||||
nWindowsEdition = (int)dwProductType;
|
||||
|
||||
// Add the build number (including UBR if available) for Windows 8.0 and later
|
||||
nWindowsBuildNumber = vi.dwBuildNumber;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue