Changeset 101381 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Oct 6, 2023 10:00:59 AM (16 months ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImplConfigX86.cpp
r101374 r101381 680 680 BOOL fW9xGuest = FALSE; 681 681 BOOL fDosGuest = FALSE; 682 if ( !pGuestOSType.isNull())682 if (pGuestOSType.isNotNull()) 683 683 { 684 684 Bstr guestTypeFamilyId; … … 686 686 fOsXGuest = guestTypeFamilyId == Bstr("MacOS"); 687 687 fWinGuest = guestTypeFamilyId == Bstr("Windows"); 688 fOs2Guest = osTypeId.startsWith( "OS2");689 fW9xGuest = osTypeId.startsWith( "Windows9"); /* Does not include Windows Me. */690 fDosGuest = osTypeId. startsWith("DOS") || osTypeId.startsWith("Windows31");688 fOs2Guest = osTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("OS2")); 689 fW9xGuest = osTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows9")); /* Does not include Windows Me. */ 690 fDosGuest = osTypeId.equals(GUEST_OS_ID_STR_X86("DOS")) || osTypeId.equals(GUEST_OS_ID_STR_X86("Windows31")); 691 691 } 692 692 … … 767 767 /* We must limit CPUID count for Windows NT 4, as otherwise it stops 768 768 with error 0x3e (MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED). */ 769 if (osTypeId == "WindowsNT4")769 if (osTypeId == GUEST_OS_ID_STR_X86("WindowsNT4")) 770 770 { 771 771 LogRel(("Limiting CPUID leaf count for NT4 guests\n")); … … 925 925 but that requires quite a bit of API change in Main. */ 926 926 if ( fIOAPIC 927 && ( osTypeId == "WindowsNT4"928 || osTypeId == "Windows2000"929 || osTypeId == "WindowsXP"930 || osTypeId == "Windows2003"))927 && ( osTypeId == GUEST_OS_ID_STR_X86("WindowsNT4") 928 || osTypeId == GUEST_OS_ID_STR_X86("Windows2000") 929 || osTypeId == GUEST_OS_ID_STR_X86("WindowsXP") 930 || osTypeId == GUEST_OS_ID_STR_X86("Windows2003"))) 931 931 { 932 932 /* Only allow TPR patching for NT, Win2k, XP and Windows Server 2003. (32 bits mode) … … 1008 1008 1009 1009 /* Enable workaround for missing TLB flush for OS/2 guests, see ticketref:20625. */ 1010 if ( osTypeId.startsWith("OS2"))1010 if (fOs2Guest) 1011 1011 InsertConfigInteger(pHM, "MissingOS2TlbFlushWorkaround", 1); 1012 1012 … … 1638 1638 /** @todo @bugref{7145}: We might want to enable this by default for new VMs. For now, 1639 1639 * this is required for Windows 2012 guests. */ 1640 if (osTypeId == "Windows2012_64")1640 if (osTypeId == GUEST_OS_ID_STR_X64("Windows2012")) 1641 1641 InsertConfigInteger(pBiosCfg, "DmiExposeMemoryTable", 1); /* boolean */ 1642 1642 } -
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r99252 r101381 2878 2878 * Determine guest OS type and the required installer image. 2879 2879 */ 2880 /** @todo r=bird: Why are we using the guest properties for this instead of the 2881 * reported guest VBOXOSTYPE/ID? Since we've got guest properties, we must 2882 * have GAs, so the guest additions must've reported the guest OS type. That 2883 * would allow proper OS categorization by family ID instead of this ridiculous 2884 * naive code assuming anything that isn't windows or solaris must be linux. */ 2880 2885 Utf8Str strOSType; 2881 2886 vrc = getGuestProperty(pGuest, "/VirtualBox/GuestInfo/OS/Product", strOSType); 2882 2887 if (RT_SUCCESS(vrc)) 2883 2888 { 2884 if ( strOSType.contains( "Microsoft", Utf8Str::CaseInsensitive)2885 || strOSType.contains( "Windows", Utf8Str::CaseInsensitive))2889 if ( strOSType.contains(GUEST_OS_ID_STR_PARTIAL("Microsoft"), Utf8Str::CaseInsensitive) 2890 || strOSType.contains(GUEST_OS_ID_STR_PARTIAL("Windows"), Utf8Str::CaseInsensitive)) 2886 2891 { 2887 2892 osType = eOSType_Windows; … … 2927 2932 } 2928 2933 } 2929 else if (strOSType.contains( "Solaris", Utf8Str::CaseInsensitive))2934 else if (strOSType.contains(GUEST_OS_ID_STR_PARTIAL("Solaris"), Utf8Str::CaseInsensitive)) 2930 2935 { 2931 2936 osType = eOSType_Solaris;
Note:
See TracChangeset
for help on using the changeset viewer.