Changeset 101381 in vbox
- Timestamp:
- Oct 6, 2023 10:00:59 AM (18 months ago)
- svn:sync-xref-src-repo-rev:
- 159384
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r101379 r101381 302 302 <cpp line="#define GUEST_OS_ID_STR_ARM32(a_szOSid) GUEST_OS_ID_STR_A32(a_szOSid)"/> 303 303 <cpp line="#define GUEST_OS_ID_STR_ARM64(a_szOSid) GUEST_OS_ID_STR_A64(a_szOSid)"/> 304 <cpp line="#define GUEST_OS_ID_STR_PARTIAL(a_szOSidPart) a_szOSidPart"/> 304 305 305 306 <!-- -
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; -
trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
r101317 r101381 4284 4284 */ 4285 4285 const char *pszOSTypeId = Global::OSTypeId(rImage.mOSType); 4286 if (pszOSTypeId && strcmp(pszOSTypeId, "Other") != 0)4286 if (pszOSTypeId && !RTStrStartsWith(pszOSTypeId, GUEST_OS_ID_STR_PARTIAL("Other"))) /** @todo set x64/a64 other variants or not? */ 4287 4287 mStrDetectedOSTypeId = pszOSTypeId; 4288 4288 else -
trunk/src/VBox/Main/testcase/tstVBoxAPIXPCOM.cpp
r101035 r101381 230 230 */ 231 231 nsCOMPtr<IGuestOSType> osType; 232 rc = virtualBox->GetGuestOSType(NS_LITERAL_STRING( "Windows2000").get(),232 rc = virtualBox->GetGuestOSType(NS_LITERAL_STRING(GUEST_OS_ID_STR_X86("Windows2000")).get(), 233 233 getter_AddRefs(osType)); 234 234 if (NS_FAILED(rc)) … … 238 238 else 239 239 { 240 machine->SetOSTypeId(NS_LITERAL_STRING( "Windows2000").get());240 machine->SetOSTypeId(NS_LITERAL_STRING(GUEST_OS_ID_STR_X86("Windows2000")).get()); 241 241 } 242 242 -
trunk/src/VBox/Main/xml/Settings.cpp
r101379 r101381 6832 6832 } const g_aConvertGuestOSTypesPre1_5[] = 6833 6833 { 6834 { "unknown", "Other"},6835 { "dos", "DOS"},6836 { "win31", "Windows31"},6837 { "win95", "Windows95"},6838 { "win98", "Windows98"},6839 { "winme", "WindowsMe"},6840 { "winnt4", "WindowsNT4"},6841 { "win2k", "Windows2000"},6842 { "winxp", "WindowsXP"},6843 { "win2k3", "Windows2003"},6844 { "winvista", "WindowsVista"},6845 { "win2k8", "Windows2008"},6846 { "os2warp3", "OS2Warp3"},6847 { "os2warp4", "OS2Warp4"},6848 { "os2warp45", "OS2Warp45"},6849 { "ecs", "OS2eCS"},6850 { "linux22", "Linux22"},6851 { "linux24", "Linux24"},6852 { "linux26", "Linux26"},6853 { "archlinux", "ArchLinux"},6854 { "debian", "Debian"},6855 { "opensuse", "OpenSUSE"},6856 { "fedoracore", "Fedora"},6857 { "gentoo", "Gentoo"},6858 { "mandriva", "Mandriva"},6859 { "redhat", "RedHat"},6860 { "ubuntu", "Ubuntu"},6861 { "xandros", "Xandros"},6862 { "freebsd", "FreeBSD"},6863 { "openbsd", "OpenBSD"},6864 { "netbsd", "NetBSD"},6865 { "netware", "Netware"},6866 { "solaris", "Solaris"},6867 { "opensolaris", "OpenSolaris"},6868 { "l4", "L4" }6834 { "unknown", GUEST_OS_ID_STR_X86("Other") }, 6835 { "dos", GUEST_OS_ID_STR_X86("DOS") }, 6836 { "win31", GUEST_OS_ID_STR_X86("Windows31") }, 6837 { "win95", GUEST_OS_ID_STR_X86("Windows95") }, 6838 { "win98", GUEST_OS_ID_STR_X86("Windows98") }, 6839 { "winme", GUEST_OS_ID_STR_X86("WindowsMe") }, 6840 { "winnt4", GUEST_OS_ID_STR_X86("WindowsNT4") }, 6841 { "win2k", GUEST_OS_ID_STR_X86("Windows2000") }, 6842 { "winxp", GUEST_OS_ID_STR_X86("WindowsXP") }, 6843 { "win2k3", GUEST_OS_ID_STR_X86("Windows2003") }, 6844 { "winvista", GUEST_OS_ID_STR_X86("WindowsVista") }, 6845 { "win2k8", GUEST_OS_ID_STR_X86("Windows2008") }, 6846 { "os2warp3", GUEST_OS_ID_STR_X86("OS2Warp3") }, 6847 { "os2warp4", GUEST_OS_ID_STR_X86("OS2Warp4") }, 6848 { "os2warp45", GUEST_OS_ID_STR_X86("OS2Warp45") }, 6849 { "ecs", GUEST_OS_ID_STR_X86("OS2eCS") }, 6850 { "linux22", GUEST_OS_ID_STR_X86("Linux22") }, 6851 { "linux24", GUEST_OS_ID_STR_X86("Linux24") }, 6852 { "linux26", GUEST_OS_ID_STR_X86("Linux26") }, 6853 { "archlinux", GUEST_OS_ID_STR_X86("ArchLinux") }, 6854 { "debian", GUEST_OS_ID_STR_X86("Debian") }, 6855 { "opensuse", GUEST_OS_ID_STR_X86("OpenSUSE") }, 6856 { "fedoracore", GUEST_OS_ID_STR_X86("Fedora") }, 6857 { "gentoo", GUEST_OS_ID_STR_X86("Gentoo") }, 6858 { "mandriva", GUEST_OS_ID_STR_X86("Mandriva") }, 6859 { "redhat", GUEST_OS_ID_STR_X86("RedHat") }, 6860 { "ubuntu", GUEST_OS_ID_STR_X86("Ubuntu") }, 6861 { "xandros", GUEST_OS_ID_STR_X86("Xandros") }, 6862 { "freebsd", GUEST_OS_ID_STR_X86("FreeBSD") }, 6863 { "openbsd", GUEST_OS_ID_STR_X86("OpenBSD") }, 6864 { "netbsd", GUEST_OS_ID_STR_X86("NetBSD") }, 6865 { "netware", GUEST_OS_ID_STR_X86("Netware") }, 6866 { "solaris", GUEST_OS_ID_STR_X86("Solaris") }, 6867 { "opensolaris", GUEST_OS_ID_STR_X86("OpenSolaris") }, 6868 { "l4", GUEST_OS_ID_STR_X86("L4") }, 6869 6869 }; 6870 6870
Note:
See TracChangeset
for help on using the changeset viewer.