VirtualBox

Changeset 101593 in vbox for trunk


Ignore:
Timestamp:
Oct 25, 2023 3:37:09 PM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159677
Message:

doc/manual,Frontends/VBoxManage,Main/{Global,GuestOSType,VirtualBox.xidl}:
Revisit the OS guest OS changes which added a new 'variant' field to the
Global::sOSTypes[] table along with a new VBoxManage subcommand and
IVirtualBox methods for accessing the guest OS variant information
(r159137). After discussion with the documentation team the identifier
'variant' is being changed to the clearer 'subtype' which also doesn't
overlap with the 'variant' terminology used with medium management
(IMedium::variant(), the MediumVariant enum, etc.). bugref:5936

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/en_US/man_VBoxManage-list.xml

    r101164 r101593  
    7575        <arg choice="plain">natnets</arg>
    7676        <arg choice="plain">ostypes</arg>
    77         <arg choice="plain">osvariants</arg>
     77        <arg choice="plain">ossubtypes</arg>
    7878        <arg choice="plain">runningvms</arg>
    7979        <arg choice="plain">screenshotformats</arg>
     
    412412      </para>
    413413    </refsect2>
    414     <refsect2 id="vboxmanage-list-osvariants">
    415       <title>List the Guest Operating System Variants</title>
    416       <cmdsynopsis id="synopsis-vboxmanage-list-osvariants">
    417         <command>VBoxManage list</command>
    418         <arg choice="plain">osvariants</arg>
    419       </cmdsynopsis>
    420       <para>
    421         The <command>VBoxManage list osvariants</command> command lists
    422         all guest operating system (OS) variants along with the
     414    <refsect2 id="vboxmanage-list-ossubtypes">
     415      <title>List the Guest Operating System Subtypes</title>
     416      <cmdsynopsis id="synopsis-vboxmanage-list-ossubtypes">
     417        <command>VBoxManage list</command>
     418        <arg choice="plain">ossubtypes</arg>
     419      </cmdsynopsis>
     420      <para>
     421        The <command>VBoxManage list ossubtypes</command> command lists
     422        all guest operating system (OS) subtypes along with the
    423423        associated guest OS descriptions that are known to &product-name;.
    424424        Each list entry includes a guest OS family identifier, the guest
    425         OS variants associated with that OS family (if any), and a
    426         description the guest OSes associated with that OS variant.
     425        OS subtypes associated with that OS family (if any), and a
     426        description the guest OSes associated with that OS subtype.
    427427      </para>
    428428    </refsect2>
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r101289 r101593  
    823823        guestOS->COMGETTER(FamilyDescription)(familyDescription.asOutParam());
    824824        RTPrintf(List::tr("Family Desc: %ls\n"), familyDescription.raw());
    825         Bstr guestOSVariant;
    826         guestOS->COMGETTER(Variant)(guestOSVariant.asOutParam());
    827         if (guestOSVariant.isNotEmpty())
    828             RTPrintf(List::tr("OS Variant:  %ls\n"), guestOSVariant.raw());
     825        Bstr guestOSSubtype;
     826        guestOS->COMGETTER(Subtype)(guestOSSubtype.asOutParam());
     827        if (guestOSSubtype.isNotEmpty())
     828            RTPrintf(List::tr("OS Subtype:  %ls\n"), guestOSSubtype.raw());
    829829        BOOL is64Bit;
    830830        guestOS->COMGETTER(Is64Bit)(&is64Bit);
     
    20622062    kListRunningVMs,
    20632063    kListOsTypes,
    2064     kListOsVariants,
     2064    kListOsSubtypes,
    20652065    kListHostDvds,
    20662066    kListHostFloppies,
     
    22082208        }
    22092209
    2210         case kListOsVariants:
     2210        case kListOsSubtypes:
    22112211        {
    22122212            com::SafeArray<BSTR> GuestOSFamilies;
     
    22172217                {
    22182218                    const Bstr bstrOSFamily = GuestOSFamilies[i];
    2219                     com::SafeArray<BSTR> GuestOSVariants;
     2219                    com::SafeArray<BSTR> GuestOSSubtypes;
    22202220                    CHECK_ERROR(pVirtualBox,
    2221                                 GetGuestOSVariantsByFamilyId(bstrOSFamily.raw(),
    2222                                                              ComSafeArrayAsOutParam(GuestOSVariants)));
     2221                                GetGuestOSSubtypesByFamilyId(bstrOSFamily.raw(),
     2222                                                             ComSafeArrayAsOutParam(GuestOSSubtypes)));
    22232223                    if (SUCCEEDED(hrc))
    22242224                    {
    22252225                        RTPrintf("%ls\n", bstrOSFamily.raw());
    2226                         for (size_t j = 0; j < GuestOSVariants.size(); ++j)
     2226                        for (size_t j = 0; j < GuestOSSubtypes.size(); ++j)
    22272227                        {
    2228                             RTPrintf("\t%ls\n", GuestOSVariants[j]);
     2228                            RTPrintf("\t%ls\n", GuestOSSubtypes[j]);
    22292229                            com::SafeArray<BSTR> GuestOSDescs;
    2230                             const Bstr bstrOSVariant = GuestOSVariants[j];
     2230                            const Bstr bstrOSSubtype = GuestOSSubtypes[j];
    22312231                            CHECK_ERROR(pVirtualBox,
    2232                                         GetGuestOSDescsByVariant(bstrOSVariant.raw(),
     2232                                        GetGuestOSDescsBySubtype(bstrOSSubtype.raw(),
    22332233                                                                 ComSafeArrayAsOutParam(GuestOSDescs)));
    22342234                            if (SUCCEEDED(hrc))
     
    24782478        { "runningvms",         kListRunningVMs,         RTGETOPT_REQ_NOTHING },
    24792479        { "ostypes",            kListOsTypes,            RTGETOPT_REQ_NOTHING },
    2480         { "osvariants",         kListOsVariants,         RTGETOPT_REQ_NOTHING },
     2480        { "ossubtypes",         kListOsSubtypes,         RTGETOPT_REQ_NOTHING },
    24812481        { "hostdvds",           kListHostDvds,           RTGETOPT_REQ_NOTHING },
    24822482        { "hostfloppies",       kListHostFloppies,       RTGETOPT_REQ_NOTHING },
     
    25452545            case kListRunningVMs:
    25462546            case kListOsTypes:
    2547             case kListOsVariants:
     2547            case kListOsSubtypes:
    25482548            case kListHostDvds:
    25492549            case kListHostFloppies:
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.cpp

    r101519 r101593  
    248248{
    249249    if (m_strSubtype.isEmpty() && m_comGuestOSType.isOk())
    250         m_strSubtype = m_comGuestOSType.GetVariant();
     250        m_strSubtype = m_comGuestOSType.GetSubtype();
    251251    return m_strSubtype;
    252252}
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r101472 r101593  
    35303530    </method>
    35313531
    3532     <method name="getGuestOSVariantsByFamilyId">
     3532    <method name="getGuestOSSubtypesByFamilyId">
    35333533      <rest request="get" path="/server/methods/"/>
    35343534      <desc>
    3535         Returns a list of guest OS family variants for a corresponding
     3535        Returns a list of guest OS family subtypes for a corresponding
    35363536        guest OS family ID type.
    35373537
     
    35403540        <link to="IGuestOSType::familyId"/> attribute which contains a
    35413541        the guest OS family this object describes.  The guest OS family
    3542         variant is contained in the <link to="IGuestOSType::variant"/>
     3542        subtype is contained in the <link to="IGuestOSType::subtype"/>
    35433543        attribute.
    35443544
     
    35513551        <desc>Guest OS type ID string.</desc>
    35523552      </param>
    3553       <param name="OSvariants" type="wstring" safearray="yes" dir="return">
    3554         <desc>Array of guest OS family variants associated with the specified guest OS family ID.</desc>
    3555       </param>
    3556     </method>
    3557 
    3558     <method name="getGuestOSDescsByVariant">
     3553      <param name="OSsubtypes" type="wstring" safearray="yes" dir="return">
     3554        <desc>Array of guest OS family subtypes associated with the specified guest OS family ID.</desc>
     3555      </param>
     3556    </method>
     3557
     3558    <method name="getGuestOSDescsBySubtype">
    35593559      <rest request="get" path="/server/methods/"/>
    35603560      <desc>
    35613561        Returns a list of guest OS family descriptions for a corresponding
    3562         guest OS family variant.
     3562        guest OS family subtype.
    35633563
    35643564        The <link to="IVirtualBox::guestOSTypes"/> collection contains all
    35653565        available guest OS type objects. Each object has an
    3566         <link to="IGuestOSType::variant"/> attribute which contains a
    3567         human readable description of the guest OS variant this object describes.
     3566        <link to="IGuestOSType::subtype"/> attribute which contains a
     3567        human readable description of the guest OS subtype this object describes.
    35683568        The guest OS family description is contained in the
    35693569        <link to="IGuestOSType::familyDescription"/> attribute.
    35703570
    35713571        <result name="E_INVALIDARG">
    3572           @a OSVariant is not a valid guest OS variant.
    3573         </result>
    3574 
    3575       </desc>
    3576       <param name="OSVariant" type="wstring" dir="in">
    3577         <desc>Guest OS variant.</desc>
     3572          @a OSSubtype is not a valid guest OS subtype.
     3573        </result>
     3574
     3575      </desc>
     3576      <param name="OSSubtype" type="wstring" dir="in">
     3577        <desc>Guest OS subtype.</desc>
    35783578      </param>
    35793579      <param name="GuestOSDescs" type="wstring" safearray="yes" dir="return">
    3580         <desc>Array of guest OS descriptions associated with the specified guest OS variant.</desc>
     3580        <desc>Array of guest OS descriptions associated with the specified guest OS subtype.</desc>
    35813581      </param>
    35823582    </method>
     
    1357913579    </attribute>
    1358013580
    13581     <attribute name="variant" type="wstring" readonly="yes">
    13582       <desc>Guest OS variant string.</desc>
     13581    <attribute name="subtype" type="wstring" readonly="yes">
     13582      <desc>Guest OS subtype string.</desc>
    1358313583    </attribute>
    1358413584
  • trunk/src/VBox/Main/include/Global.h

    r101460 r101593  
    9797        const char                    *familyId;          /* utf-8, e.g. Linux or MacOS  */
    9898        const char                    *familyDescription; /* utf-8, e.g. Linux or Mac OS X */
    99         const char                    *variant;     /* utf-8, the subtype of the family e.g. Debian or FreeBSD */
     99        const char                    *subtype;     /* utf-8, the subtype of the family e.g. Debian or FreeBSD */
    100100        const char                    *id;          /* utf-8, VM config file value e.g. Debian12_64 */
    101101        const char                    *description; /* utf-8, e.g. "Debian 12 Bookworm (64-bit)" */
  • trunk/src/VBox/Main/include/GuestOSTypeImpl.h

    r101215 r101593  
    5353    const Utf8Str &i_id() const { return mID; }
    5454    const Utf8Str &i_familyId() const { return mFamilyID; }
    55     const Utf8Str &i_variant() const { return mOSVariant; }
     55    const Utf8Str &i_subtype() const { return mOSSubtype; }
    5656    const Utf8Str &i_description() const { return mDescription; }
    5757    bool i_is64Bit() const { return !!(mOSHint & VBOXOSHINT_64BIT); }
     
    7171    HRESULT getFamilyId(com::Utf8Str &aFamilyId);
    7272    HRESULT getFamilyDescription(com::Utf8Str &aFamilyDescription);
    73     HRESULT getVariant(com::Utf8Str &aVariant);
     73    HRESULT getSubtype(com::Utf8Str &aSubtype);
    7474    HRESULT getId(com::Utf8Str &aId);
    7575    HRESULT getDescription(com::Utf8Str &aDescription);
     
    112112    const Utf8Str mFamilyID;
    113113    const Utf8Str mFamilyDescription;
    114     const Utf8Str mOSVariant;
     114    const Utf8Str mOSSubtype;
    115115    const Utf8Str mID;
    116116    const Utf8Str mDescription;
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r101318 r101593  
    400400    HRESULT getGuestOSType(const com::Utf8Str &aId,
    401401                           ComPtr<IGuestOSType> &aType);
    402     HRESULT getGuestOSVariantsByFamilyId(const Utf8Str &strOSFamily,
    403                                          std::vector<com::Utf8Str> &aOSVariants);
    404     HRESULT getGuestOSDescsByVariant(const Utf8Str &strOSVariant,
     402    HRESULT getGuestOSSubtypesByFamilyId(const Utf8Str &strOSFamily,
     403                                         std::vector<com::Utf8Str> &aOSSubtypes);
     404    HRESULT getGuestOSDescsBySubtype(const Utf8Str &strOSSubtype,
    405405                                     std::vector<com::Utf8Str> &aGuestOSDescs);
    406406    HRESULT createSharedFolder(const com::Utf8Str &aName,
  • trunk/src/VBox/Main/src-all/Global.cpp

    r101579 r101593  
    237237#define VBOX_LINUX_OSHINTS_D_X64  (VBOXOSHINT_RTCUTC | VBOXOSHINT_64BIT | VBOXOSHINT_X86_HWVIRTEX | VBOXOSHINT_X86_IOAPIC)
    238238
    239 #define VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szVariant, a_Id, a_Description, a_OStype, a_OSHint, a_Memory, a_Vram, a_Diskspace, \
     239#define VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szSubtype, a_Id, a_Description, a_OStype, a_OSHint, a_Memory, a_Vram, a_Diskspace, \
    240240                                        a_NetworkAdapter, a_HDStorageController, a_HDStorageBusType) \
    241     { "Linux",   "Linux", a_szVariant, GUEST_OS_ID_STR_X86(#a_Id), a_Description, VBOX_OSTYPE_X86(a_OStype), a_OSHint, \
     241    { "Linux",   "Linux", a_szSubtype, GUEST_OS_ID_STR_X86(#a_Id), a_Description, VBOX_OSTYPE_X86(a_OStype), a_OSHint, \
    242242      1, a_Memory, a_Vram, a_Diskspace * _1G64, GraphicsControllerType_VMSVGA, a_NetworkAdapter, 0, StorageControllerType_PIIX4, StorageBus_IDE, \
    243243      a_HDStorageController, a_HDStorageBusType, ChipsetType_PIIX3, IommuType_None, AudioControllerType_AC97, AudioCodecType_AD1980  }
    244244
    245 #define VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szVariant, a_Id, a_Description, a_OStype, a_OSHint, a_Memory, a_Vram, a_Diskspace, \
     245#define VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szSubtype, a_Id, a_Description, a_OStype, a_OSHint, a_Memory, a_Vram, a_Diskspace, \
    246246                                        a_NetworkAdapter, a_HDStorageController, a_HDStorageBusType) \
    247     { "Linux",   "Linux", a_szVariant, GUEST_OS_ID_STR_X64(#a_Id), a_Description, VBOX_OSTYPE_X64(a_OStype), a_OSHint, \
     247    { "Linux",   "Linux", a_szSubtype, GUEST_OS_ID_STR_X64(#a_Id), a_Description, VBOX_OSTYPE_X64(a_OStype), a_OSHint, \
    248248      1, a_Memory, a_Vram, a_Diskspace * _1G64, GraphicsControllerType_VMSVGA, a_NetworkAdapter, 0, StorageControllerType_PIIX4, StorageBus_IDE, \
    249249      a_HDStorageController, a_HDStorageBusType, ChipsetType_PIIX3, IommuType_None, AudioControllerType_AC97, AudioCodecType_AD1980  }
    250250
    251 #define VBOX_LINUX_SUBTYPE_TEMPLATE_A64(a_szVariant, a_Id, a_Description, a_OStype, a_OSHint, a_Memory, a_Vram, a_Diskspace, \
     251#define VBOX_LINUX_SUBTYPE_TEMPLATE_A64(a_szSubtype, a_Id, a_Description, a_OStype, a_OSHint, a_Memory, a_Vram, a_Diskspace, \
    252252                                        a_NetworkAdapter, a_HDStorageController, a_HDStorageBusType) \
    253     { "Linux",   "Linux", a_szVariant, GUEST_OS_ID_STR_A64(#a_Id), a_Description, VBOX_OSTYPE_ARM64(a_OStype), a_OSHint, \
     253    { "Linux",   "Linux", a_szSubtype, GUEST_OS_ID_STR_A64(#a_Id), a_Description, VBOX_OSTYPE_ARM64(a_OStype), a_OSHint, \
    254254      1, a_Memory, a_Vram, a_Diskspace * _1G64, GraphicsControllerType_VMSVGA, a_NetworkAdapter, 0, StorageControllerType_VirtioSCSI, StorageBus_VirtioSCSI, \
    255255      a_HDStorageController, a_HDStorageBusType, ChipsetType_ARMv8Virtual, IommuType_None, AudioControllerType_HDA, AudioCodecType_STAC9221  }
    256256
    257 #define VBOX_LINUX_SUBTYPE_TEMPLATE_ARM64(a_szVariant, a_Id, a_Description, a_OStype, a_OSHint, a_Memory, a_Vram, a_Diskspace, \
     257#define VBOX_LINUX_SUBTYPE_TEMPLATE_ARM64(a_szSubtype, a_Id, a_Description, a_OStype, a_OSHint, a_Memory, a_Vram, a_Diskspace, \
    258258                                          a_NetworkAdapter, a_HDStorageController, a_HDStorageBusType) \
    259     { "Linux",   "Linux", a_szVariant, GUEST_OS_ID_STR_A64(#a_Id), a_Description, VBOX_OSTYPE_ARM64(a_OStype), a_OSHint, \
     259    { "Linux",   "Linux", a_szSubtype, GUEST_OS_ID_STR_A64(#a_Id), a_Description, VBOX_OSTYPE_ARM64(a_OStype), a_OSHint, \
    260260      1, a_Memory, a_Vram, a_Diskspace * _1G64, GraphicsControllerType_VMSVGA, a_NetworkAdapter, 0, StorageControllerType_VirtioSCSI, StorageBus_VirtioSCSI, \
    261261      a_HDStorageController, a_HDStorageBusType, ChipsetType_ARMv8Virtual, IommuType_None, AudioControllerType_HDA, AudioCodecType_STAC9221 }
    262262
    263263/* Linux x86 32-bit sub-type template defaulting to 1 CPU with USB-tablet-mouse/VMSVGA/Intel-Pro1000/PIIX4+IDE DVD/AHCI+SATA disk/AC97 */
    264 #define VBOX_LINUX_SUBTYPE_A_X86(a_szVariant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
    265     VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szVariant, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_A_X86, a_Memory, a_Vram, a_Diskspace, \
     264#define VBOX_LINUX_SUBTYPE_A_X86(a_szSubtype, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
     265    VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szSubtype, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_A_X86, a_Memory, a_Vram, a_Diskspace, \
    266266                                     NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA)
    267267
    268268/* Linux x86 64-bit sub-type template defaulting to 1 CPU with USB-tablet-mouse/VMSVGA/Intel-Pro1000/PIIX4+IDE DVD/AHCI+SATA disk/AC97 */
    269 #define VBOX_LINUX_SUBTYPE_A_X64(a_szVariant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
    270     VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szVariant, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_A_X64, a_Memory, a_Vram, a_Diskspace, \
     269#define VBOX_LINUX_SUBTYPE_A_X64(a_szSubtype, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
     270    VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szSubtype, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_A_X64, a_Memory, a_Vram, a_Diskspace, \
    271271                                     NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA)
    272272
    273 #define VBOX_LINUX_SUBTYPE_A_A64(a_szVariant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
    274     VBOX_LINUX_SUBTYPE_TEMPLATE_ARM64(a_szVariant, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_A_ARM64, a_Memory, a_Vram, a_Diskspace, \
     273#define VBOX_LINUX_SUBTYPE_A_A64(a_szSubtype, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
     274    VBOX_LINUX_SUBTYPE_TEMPLATE_ARM64(a_szSubtype, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_A_ARM64, a_Memory, a_Vram, a_Diskspace, \
    275275                                      NetworkAdapterType_I82540EM, StorageControllerType_VirtioSCSI, StorageBus_VirtioSCSI)
    276276
    277 #define VBOX_LINUX_SUBTYPE_A_WITH_OSTYPE_X86(a_szVariant, a_Id, a_Description, a_OStype, a_Memory, a_Vram, a_Diskspace) \
    278     VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szVariant, a_Id, a_Description, a_OStype, VBOX_LINUX_OSHINTS_A_X86, a_Memory, a_Vram, a_Diskspace, \
     277#define VBOX_LINUX_SUBTYPE_A_WITH_OSTYPE_X86(a_szSubtype, a_Id, a_Description, a_OStype, a_Memory, a_Vram, a_Diskspace) \
     278    VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szSubtype, a_Id, a_Description, a_OStype, VBOX_LINUX_OSHINTS_A_X86, a_Memory, a_Vram, a_Diskspace, \
    279279                                    NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA)
    280280
    281 #define VBOX_LINUX_SUBTYPE_A_WITH_OSTYPE_X64(a_szVariant, a_Id, a_Description, a_OStype, a_Memory, a_Vram, a_Diskspace) \
    282     VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szVariant, a_Id, a_Description, a_OStype, VBOX_LINUX_OSHINTS_A_X64, a_Memory, a_Vram, a_Diskspace, \
     281#define VBOX_LINUX_SUBTYPE_A_WITH_OSTYPE_X64(a_szSubtype, a_Id, a_Description, a_OStype, a_Memory, a_Vram, a_Diskspace) \
     282    VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szSubtype, a_Id, a_Description, a_OStype, VBOX_LINUX_OSHINTS_A_X64, a_Memory, a_Vram, a_Diskspace, \
    283283                                    NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA)
    284284
    285 #define VBOX_LINUX_SUBTYPE_A_WITH_OSTYPE_A64(a_szVariant, a_Id, a_Description, a_OStype, a_Memory, a_Vram, a_Diskspace) \
    286     VBOX_LINUX_SUBTYPE_TEMPLATE_A64(a_szVariant, a_Id, a_Description, a_OStype, VBOX_LINUX_OSHINTS_A_ARM64, a_Memory, a_Vram, a_Diskspace, \
     285#define VBOX_LINUX_SUBTYPE_A_WITH_OSTYPE_A64(a_szSubtype, a_Id, a_Description, a_OStype, a_Memory, a_Vram, a_Diskspace) \
     286    VBOX_LINUX_SUBTYPE_TEMPLATE_A64(a_szSubtype, a_Id, a_Description, a_OStype, VBOX_LINUX_OSHINTS_A_ARM64, a_Memory, a_Vram, a_Diskspace, \
    287287                                    NetworkAdapterType_I82540EM, StorageControllerType_VirtioSCSI, StorageBus_VirtioSCSI)
    288288
    289289/* Linux x86 32-bit sub-type template defaulting to 1 CPU with PS/2-mouse/PAE-NX/VMSVGA/Intel-Pro1000/PIIX4+IDE DVD/AHCI+SATA disk/AC97 */
    290 #define VBOX_LINUX_SUBTYPE_B_X86(a_szVariant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
    291     VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szVariant, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_B_X86, a_Memory, a_Vram, a_Diskspace, \
     290#define VBOX_LINUX_SUBTYPE_B_X86(a_szSubtype, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
     291    VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szSubtype, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_B_X86, a_Memory, a_Vram, a_Diskspace, \
    292292                                    NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA)
    293293
    294294/* Linux 64-bit sub-type template defaulting to 1 CPU with PS/2-mouse/PAE-NX/VMSVGA/Intel-Pro1000/PIIX4+IDE DVD/AHCI+SATA disk/AC97 */
    295 #define VBOX_LINUX_SUBTYPE_B_X64(a_szVariant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
    296     VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szVariant, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_B_X64, a_Memory, a_Vram, a_Diskspace, \
     295#define VBOX_LINUX_SUBTYPE_B_X64(a_szSubtype, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
     296    VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szSubtype, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_B_X64, a_Memory, a_Vram, a_Diskspace, \
    297297                                    NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA)
    298298
    299 #define VBOX_LINUX_SUBTYPE_B_A64(a_szVariant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
    300     VBOX_LINUX_SUBTYPE_TEMPLATE_ARM64(a_szVariant, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_B_ARM64, a_Memory, a_Vram, a_Diskspace, \
     299#define VBOX_LINUX_SUBTYPE_B_A64(a_szSubtype, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
     300    VBOX_LINUX_SUBTYPE_TEMPLATE_ARM64(a_szSubtype, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_B_ARM64, a_Memory, a_Vram, a_Diskspace, \
    301301                                      NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA)
    302302
    303303/* Linux 32-bit sub-type template defaulting to 1 CPU with PS/2-mouse/VMSVGA/Intel-Pro1000/PIIX4+IDE DVD/AHCI+SATA disk/AC97 */
    304 #define VBOX_LINUX_SUBTYPE_C_X86(a_szVariant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
    305     VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szVariant, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_C_X86, a_Memory, a_Vram, a_Diskspace, \
     304#define VBOX_LINUX_SUBTYPE_C_X86(a_szSubtype, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
     305    VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szSubtype, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_C_X86, a_Memory, a_Vram, a_Diskspace, \
    306306                                    NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA)
    307307
    308308/* Linux 64-bit sub-type template defaulting to 1 CPU with PS/2-mouse/VMSVGA/Intel-Pro1000/PIIX4+IDE DVD/AHCI+SATA disk/AC97 */
    309 #define VBOX_LINUX_SUBTYPE_C_X64(a_szVariant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
    310     VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szVariant, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_C_X64, a_Memory, a_Vram, a_Diskspace, \
     309#define VBOX_LINUX_SUBTYPE_C_X64(a_szSubtype, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
     310    VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szSubtype, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_C_X64, a_Memory, a_Vram, a_Diskspace, \
    311311                                    NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA)
    312312
    313313/* Linux 32-bit sub-type template defaulting to 1 CPU with PS/2-mouse/VMSVGA/PCnet-FASTIII/PIIX4+IDE DVD/PIIX4+IDE disk/AC97 */
    314 #define VBOX_LINUX_SUBTYPE_D_X86(a_szVariant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
    315     VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szVariant, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_D_X86, a_Memory, a_Vram, a_Diskspace, \
     314#define VBOX_LINUX_SUBTYPE_D_X86(a_szSubtype, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
     315    VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_szSubtype, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_D_X86, a_Memory, a_Vram, a_Diskspace, \
    316316                                    NetworkAdapterType_Am79C973, StorageControllerType_PIIX4, StorageBus_IDE)
    317317
    318318/* Linux 64-bit sub-type template defaulting to 1 CPU with PS/2-mouse/VMSVGA/PCnet-FASTIII/PIIX4+IDE DVD/PIIX4+IDE disk/AC97 */
    319 #define VBOX_LINUX_SUBTYPE_D_X64(a_szVariant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
    320     VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szVariant, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_D_X64, a_Memory, a_Vram, a_Diskspace, \
     319#define VBOX_LINUX_SUBTYPE_D_X64(a_szSubtype, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \
     320    VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_szSubtype, a_Id, a_Description, a_Id, VBOX_LINUX_OSHINTS_D_X64, a_Memory, a_Vram, a_Diskspace, \
    321321                                    NetworkAdapterType_I82540EM, StorageControllerType_PIIX4, StorageBus_IDE)
    322322
  • trunk/src/VBox/Main/src-server/GuestOSTypeImpl.cpp

    r101215 r101593  
    100100    unconst(mFamilyID)                  = ostype.familyId;
    101101    unconst(mFamilyDescription)         = ostype.familyDescription;
    102     unconst(mOSVariant)                 = ostype.variant;
     102    unconst(mOSSubtype)                 = ostype.subtype;
    103103    unconst(mID)                        = ostype.id;
    104104    unconst(mDescription)               = ostype.description;
     
    159159
    160160
    161 HRESULT GuestOSType::getVariant(com::Utf8Str &aVariant)
    162 {
    163     /* mOSVariant is constant during life time, no need to lock */
    164     aVariant = mOSVariant;
     161HRESULT GuestOSType::getSubtype(com::Utf8Str &aSubtype)
     162{
     163    /* mOSSubtype is constant during life time, no need to lock */
     164    aSubtype = mOSSubtype;
    165165
    166166    return S_OK;
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r101471 r101593  
    45184518/**
    45194519 * Walk the list of GuestOSType objects and return a list of guest OS
    4520  * variants which correspond to the supplied guest OS family ID.
     4520 * subtypes which correspond to the supplied guest OS family ID.
    45214521 *
    45224522 * @param strOSFamily    Guest OS family ID.
    4523  * @param aOSVariants    Where to store the list of guest OS variants.
     4523 * @param aOSSubtypes    Where to store the list of guest OS subtypes.
    45244524 *
    45254525 * @note Locks the guest OS types list for reading.
    45264526 */
    4527 HRESULT VirtualBox::getGuestOSVariantsByFamilyId(const Utf8Str &strOSFamily,
    4528                                                  std::vector<com::Utf8Str> &aOSVariants)
    4529 {
    4530     std::list<com::Utf8Str> allOSVariants;
     4527HRESULT VirtualBox::getGuestOSSubtypesByFamilyId(const Utf8Str &strOSFamily,
     4528                                                 std::vector<com::Utf8Str> &aOSSubtypes)
     4529{
     4530    std::list<com::Utf8Str> allOSSubtypes;
    45314531
    45324532    AutoReadLock alock(m->allGuestOSTypes.getLockHandle() COMMA_LOCKVAL_SRC_POS);
     
    45564556        if (familyId.compare(strOSFamily, Utf8Str::CaseInsensitive) == 0)
    45574557        {
    4558             const Utf8Str &strOSVariant = (*it)->i_variant();
    4559             if (!strOSVariant.isEmpty())
    4560                 allOSVariants.push_back(strOSVariant);
     4558            const Utf8Str &strOSSubtype = (*it)->i_subtype();
     4559            if (!strOSSubtype.isEmpty())
     4560                allOSSubtypes.push_back(strOSSubtype);
    45614561        }
    45624562    }
    45634563
    45644564    /* throw out any duplicates */
    4565     allOSVariants.sort();
    4566     allOSVariants.unique();
    4567 
    4568     aOSVariants.resize(allOSVariants.size());
     4565    allOSSubtypes.sort();
     4566    allOSSubtypes.unique();
     4567
     4568    aOSSubtypes.resize(allOSSubtypes.size());
    45694569    size_t i = 0;
    4570     for (std::list<com::Utf8Str>::const_iterator it = allOSVariants.begin();
    4571          it != allOSVariants.end(); ++it, ++i)
    4572         aOSVariants[i] = (*it);
     4570    for (std::list<com::Utf8Str>::const_iterator it = allOSSubtypes.begin();
     4571         it != allOSSubtypes.end(); ++it, ++i)
     4572        aOSSubtypes[i] = (*it);
    45734573
    45744574    return S_OK;
     
    45774577/**
    45784578 * Walk the list of GuestOSType objects and return a list of guest OS
    4579  * descriptions which correspond to the supplied guest OS variant.
    4580  *
    4581  * @param strOSVariant     Guest OS variant.
     4579 * descriptions which correspond to the supplied guest OS subtype.
     4580 *
     4581 * @param strOSSubtype     Guest OS subtype.
    45824582 * @param aGuestOSDescs    Where to store the list of guest OS descriptions..
    45834583 *
    45844584 * @note Locks the guest OS types list for reading.
    45854585 */
    4586 HRESULT VirtualBox::getGuestOSDescsByVariant(const Utf8Str &strOSVariant,
     4586HRESULT VirtualBox::getGuestOSDescsBySubtype(const Utf8Str &strOSSubtype,
    45874587                                             std::vector<com::Utf8Str> &aGuestOSDescs)
    45884588{
     
    45914591    AutoReadLock alock(m->allGuestOSTypes.getLockHandle() COMMA_LOCKVAL_SRC_POS);
    45924592
    4593     bool fFoundGuestOSVariant = false;
     4593    bool fFoundGuestOSSubtype = false;
    45944594    for (GuestOSTypesOList::const_iterator it = m->allGuestOSTypes.begin();
    45954595         it != m->allGuestOSTypes.end(); ++it)
    45964596    {
    4597         const Utf8Str &guestOSVariant = (*it)->i_variant();
    4598         /* Only some guest OS types have a populated variant value. */
    4599         if (guestOSVariant.isNotEmpty() &&
    4600             guestOSVariant.compare(strOSVariant, Utf8Str::CaseInsensitive) == 0)
    4601         {
    4602             fFoundGuestOSVariant = true;
     4597        const Utf8Str &guestOSSubtype = (*it)->i_subtype();
     4598        /* Only some guest OS types have a populated subtype value. */
     4599        if (guestOSSubtype.isNotEmpty() &&
     4600            guestOSSubtype.compare(strOSSubtype, Utf8Str::CaseInsensitive) == 0)
     4601        {
     4602            fFoundGuestOSSubtype = true;
    46034603            break;
    46044604        }
    46054605    }
    46064606
    4607     if (!fFoundGuestOSVariant)
     4607    if (!fFoundGuestOSSubtype)
    46084608       return setError(VBOX_E_OBJECT_NOT_FOUND,
    4609                        tr("'%s' is not a valid guest OS variant."), strOSVariant.c_str());
     4609                       tr("'%s' is not a valid guest OS subtype."), strOSSubtype.c_str());
    46104610
    46114611    for (GuestOSTypesOList::const_iterator it = m->allGuestOSTypes.begin();
    46124612         it != m->allGuestOSTypes.end(); ++it)
    46134613    {
    4614         const Utf8Str &guestOSVariant = (*it)->i_variant();
    4615         /* Only some guest OS types have a populated variant value. */
    4616         if (guestOSVariant.isNotEmpty() &&
    4617             guestOSVariant.compare(strOSVariant, Utf8Str::CaseInsensitive) == 0)
     4614        const Utf8Str &guestOSSubtype = (*it)->i_subtype();
     4615        /* Only some guest OS types have a populated subtype value. */
     4616        if (guestOSSubtype.isNotEmpty() &&
     4617            guestOSSubtype.compare(strOSSubtype, Utf8Str::CaseInsensitive) == 0)
    46184618        {
    46194619            const Utf8Str &strOSDesc = (*it)->i_description();
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