VirtualBox

Changeset 101460 in vbox


Ignore:
Timestamp:
Oct 17, 2023 8:32:09 AM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159529
Message:

Main: Moved Platform::s_platformArchitectureToStr() to Global::stringifyPlatformArchitecture(), so that the client part of VBoxSVC also can make use of this. bugref:10384

Location:
trunk/src/VBox/Main
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/Global.h

    r101215 r101460  
    202202
    203203    /**
     204     * Stringify a platform architecture to a string.
     205     *
     206     * @returns Platform architecture as a string.
     207     * @param   aEnmArchitecture        Platform architecture to convert.
     208     */
     209    static const char *stringifyPlatformArchitecture(PlatformArchitecture_T aEnmArchitecture);
     210
     211    /**
    204212     * Stringify a storage controller type.
    205213     *
  • trunk/src/VBox/Main/include/PlatformImpl.h

    r101174 r101460  
    7373public:
    7474
    75     // static public helper functions
    76     static const char *s_platformArchitectureToStr(PlatformArchitecture_T enmArchitecture);
    77 
    78 public:
    79 
    8075    // wrapped IPlatform properties
    8176    HRESULT getArchitecture(PlatformArchitecture_T *aArchitecture);
  • trunk/src/VBox/Main/src-all/Global.cpp

    r101425 r101460  
    767767}
    768768
     769/* static */ const char *
     770Global::stringifyPlatformArchitecture(PlatformArchitecture_T aEnmArchitecture)
     771{
     772    switch (aEnmArchitecture)
     773    {
     774        case PlatformArchitecture_x86: return "x86";
     775        case PlatformArchitecture_ARM: return "ARM";
     776        default:
     777            break;
     778    }
     779
     780    AssertFailedReturn("<None>");
     781}
     782
    769783#if 0 /* unused */
    770784
  • trunk/src/VBox/Main/src-server/PlatformImpl.cpp

    r101174 r101460  
    528528
    529529    return setErrorBoth(VBOX_E_PLATFORM_ARCH_NOT_SUPPORTED, VERR_PLATFORM_ARCH_NOT_SUPPORTED,
    530                         "Platform '%s' not supported", Platform::s_platformArchitectureToStr(m->bd->architectureType));
     530                        "Platform '%s' not supported", Global::stringifyPlatformArchitecture(m->bd->architectureType));
    531531}
    532532
     
    564564
    565565    return setErrorBoth(VBOX_E_PLATFORM_ARCH_NOT_SUPPORTED, VERR_PLATFORM_ARCH_NOT_SUPPORTED,
    566                             "Platform '%s' not supported", Platform::s_platformArchitectureToStr(m->bd->architectureType));
     566                            "Platform '%s' not supported", Global::stringifyPlatformArchitecture(m->bd->architectureType));
    567567}
    568568
     
    751751    {
    752752        m->bd->architectureType = aArchitecture;
    753         LogRel(("Platform architecture set to '%s'\n", Platform::s_platformArchitectureToStr(m->bd->architectureType)));
     753        LogRel(("Platform architecture set to '%s'\n", Global::stringifyPlatformArchitecture(m->bd->architectureType)));
    754754    }
    755755
     
    848848}
    849849
    850 /**
    851  * Converts a platform architecture to a string.
    852  *
    853  * @returns Platform architecture as a string.
    854  * @param   enmArchitecture         Platform architecture to convert.
    855  */
    856 /* static */
    857 const char *Platform::s_platformArchitectureToStr(PlatformArchitecture_T enmArchitecture)
    858 {
    859     switch (enmArchitecture)
    860     {
    861         case PlatformArchitecture_x86: return "x86";
    862         case PlatformArchitecture_ARM: return "ARM";
    863         default:
    864             break;
    865     }
    866 
    867     AssertFailedReturn("<None>");
    868 }
    869 
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