VirtualBox

Changeset 101171 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Sep 19, 2023 3:04:10 PM (17 months ago)
Author:
vboxsync
Message:

Main: Added a IGuestOSType::platformArchitecture attribute for returning the guest OS' platform architecture. bugref:5936

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/GuestOSTypeImpl.cpp

    r101164 r101171  
    208208}
    209209
     210HRESULT GuestOSType::getPlatformArchitecture(PlatformArchitecture_T *aPlatformArchitecture)
     211{
     212    /* mOSType constant during life time, no need to lock */
     213    VBOXOSTYPE const osTypePlatformArchitectureMasked = VBOXOSTYPE(mOSType & VBOXOSTYPE_ArchitectureMask);
     214    if (   osTypePlatformArchitectureMasked & VBOXOSTYPE_x86
     215        || osTypePlatformArchitectureMasked & VBOXOSTYPE_x64)
     216        *aPlatformArchitecture = PlatformArchitecture_x86;
     217    else if (   osTypePlatformArchitectureMasked & VBOXOSTYPE_arm32
     218             || osTypePlatformArchitectureMasked & VBOXOSTYPE_arm64)
     219        *aPlatformArchitecture = PlatformArchitecture_ARM;
     220    else
     221    {
     222        AssertFailed(); /* Something is fishy in the OSTYPE spec. */
     223        *aPlatformArchitecture = PlatformArchitecture_None;
     224    }
     225
     226    return S_OK;
     227}
     228
    210229HRESULT GuestOSType::getRecommendedIOAPIC(BOOL *aRecommendedIOAPIC)
    211230{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette