- Timestamp:
- Oct 25, 2023 3:37:09 PM (16 months ago)
- svn:sync-xref-src-repo-rev:
- 159677
- Location:
- trunk/src/VBox
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r101289 r101593 823 823 guestOS->COMGETTER(FamilyDescription)(familyDescription.asOutParam()); 824 824 RTPrintf(List::tr("Family Desc: %ls\n"), familyDescription.raw()); 825 Bstr guestOS Variant;826 guestOS->COMGETTER( Variant)(guestOSVariant.asOutParam());827 if (guestOS Variant.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()); 829 829 BOOL is64Bit; 830 830 guestOS->COMGETTER(Is64Bit)(&is64Bit); … … 2062 2062 kListRunningVMs, 2063 2063 kListOsTypes, 2064 kListOs Variants,2064 kListOsSubtypes, 2065 2065 kListHostDvds, 2066 2066 kListHostFloppies, … … 2208 2208 } 2209 2209 2210 case kListOs Variants:2210 case kListOsSubtypes: 2211 2211 { 2212 2212 com::SafeArray<BSTR> GuestOSFamilies; … … 2217 2217 { 2218 2218 const Bstr bstrOSFamily = GuestOSFamilies[i]; 2219 com::SafeArray<BSTR> GuestOS Variants;2219 com::SafeArray<BSTR> GuestOSSubtypes; 2220 2220 CHECK_ERROR(pVirtualBox, 2221 GetGuestOS VariantsByFamilyId(bstrOSFamily.raw(),2222 ComSafeArrayAsOutParam(GuestOS Variants)));2221 GetGuestOSSubtypesByFamilyId(bstrOSFamily.raw(), 2222 ComSafeArrayAsOutParam(GuestOSSubtypes))); 2223 2223 if (SUCCEEDED(hrc)) 2224 2224 { 2225 2225 RTPrintf("%ls\n", bstrOSFamily.raw()); 2226 for (size_t j = 0; j < GuestOS Variants.size(); ++j)2226 for (size_t j = 0; j < GuestOSSubtypes.size(); ++j) 2227 2227 { 2228 RTPrintf("\t%ls\n", GuestOS Variants[j]);2228 RTPrintf("\t%ls\n", GuestOSSubtypes[j]); 2229 2229 com::SafeArray<BSTR> GuestOSDescs; 2230 const Bstr bstrOS Variant = GuestOSVariants[j];2230 const Bstr bstrOSSubtype = GuestOSSubtypes[j]; 2231 2231 CHECK_ERROR(pVirtualBox, 2232 GetGuestOSDescsBy Variant(bstrOSVariant.raw(),2232 GetGuestOSDescsBySubtype(bstrOSSubtype.raw(), 2233 2233 ComSafeArrayAsOutParam(GuestOSDescs))); 2234 2234 if (SUCCEEDED(hrc)) … … 2478 2478 { "runningvms", kListRunningVMs, RTGETOPT_REQ_NOTHING }, 2479 2479 { "ostypes", kListOsTypes, RTGETOPT_REQ_NOTHING }, 2480 { "os variants", kListOsVariants, RTGETOPT_REQ_NOTHING },2480 { "ossubtypes", kListOsSubtypes, RTGETOPT_REQ_NOTHING }, 2481 2481 { "hostdvds", kListHostDvds, RTGETOPT_REQ_NOTHING }, 2482 2482 { "hostfloppies", kListHostFloppies, RTGETOPT_REQ_NOTHING }, … … 2545 2545 case kListRunningVMs: 2546 2546 case kListOsTypes: 2547 case kListOs Variants:2547 case kListOsSubtypes: 2548 2548 case kListHostDvds: 2549 2549 case kListHostFloppies: -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.cpp
r101519 r101593 248 248 { 249 249 if (m_strSubtype.isEmpty() && m_comGuestOSType.isOk()) 250 m_strSubtype = m_comGuestOSType.Get Variant();250 m_strSubtype = m_comGuestOSType.GetSubtype(); 251 251 return m_strSubtype; 252 252 } -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r101472 r101593 3530 3530 </method> 3531 3531 3532 <method name="getGuestOS VariantsByFamilyId">3532 <method name="getGuestOSSubtypesByFamilyId"> 3533 3533 <rest request="get" path="/server/methods/"/> 3534 3534 <desc> 3535 Returns a list of guest OS family variants for a corresponding3535 Returns a list of guest OS family subtypes for a corresponding 3536 3536 guest OS family ID type. 3537 3537 … … 3540 3540 <link to="IGuestOSType::familyId"/> attribute which contains a 3541 3541 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"/> 3543 3543 attribute. 3544 3544 … … 3551 3551 <desc>Guest OS type ID string.</desc> 3552 3552 </param> 3553 <param name="OS variants" 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="getGuestOSDescsBy Variant">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"> 3559 3559 <rest request="get" path="/server/methods/"/> 3560 3560 <desc> 3561 3561 Returns a list of guest OS family descriptions for a corresponding 3562 guest OS family variant.3562 guest OS family subtype. 3563 3563 3564 3564 The <link to="IVirtualBox::guestOSTypes"/> collection contains all 3565 3565 available guest OS type objects. Each object has an 3566 <link to="IGuestOSType:: variant"/> attribute which contains a3567 human readable description of the guest OS variantthis object describes.3566 <link to="IGuestOSType::subtype"/> attribute which contains a 3567 human readable description of the guest OS subtype this object describes. 3568 3568 The guest OS family description is contained in the 3569 3569 <link to="IGuestOSType::familyDescription"/> attribute. 3570 3570 3571 3571 <result name="E_INVALIDARG"> 3572 @a OS Variant is not a valid guest OS variant.3573 </result> 3574 3575 </desc> 3576 <param name="OS Variant" 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> 3578 3578 </param> 3579 3579 <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> 3581 3581 </param> 3582 3582 </method> … … 13579 13579 </attribute> 13580 13580 13581 <attribute name=" variant" type="wstring" readonly="yes">13582 <desc>Guest OS variantstring.</desc>13581 <attribute name="subtype" type="wstring" readonly="yes"> 13582 <desc>Guest OS subtype string.</desc> 13583 13583 </attribute> 13584 13584 -
trunk/src/VBox/Main/include/Global.h
r101460 r101593 97 97 const char *familyId; /* utf-8, e.g. Linux or MacOS */ 98 98 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 */ 100 100 const char *id; /* utf-8, VM config file value e.g. Debian12_64 */ 101 101 const char *description; /* utf-8, e.g. "Debian 12 Bookworm (64-bit)" */ -
trunk/src/VBox/Main/include/GuestOSTypeImpl.h
r101215 r101593 53 53 const Utf8Str &i_id() const { return mID; } 54 54 const Utf8Str &i_familyId() const { return mFamilyID; } 55 const Utf8Str &i_ variant() const { return mOSVariant; }55 const Utf8Str &i_subtype() const { return mOSSubtype; } 56 56 const Utf8Str &i_description() const { return mDescription; } 57 57 bool i_is64Bit() const { return !!(mOSHint & VBOXOSHINT_64BIT); } … … 71 71 HRESULT getFamilyId(com::Utf8Str &aFamilyId); 72 72 HRESULT getFamilyDescription(com::Utf8Str &aFamilyDescription); 73 HRESULT get Variant(com::Utf8Str &aVariant);73 HRESULT getSubtype(com::Utf8Str &aSubtype); 74 74 HRESULT getId(com::Utf8Str &aId); 75 75 HRESULT getDescription(com::Utf8Str &aDescription); … … 112 112 const Utf8Str mFamilyID; 113 113 const Utf8Str mFamilyDescription; 114 const Utf8Str mOS Variant;114 const Utf8Str mOSSubtype; 115 115 const Utf8Str mID; 116 116 const Utf8Str mDescription; -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r101318 r101593 400 400 HRESULT getGuestOSType(const com::Utf8Str &aId, 401 401 ComPtr<IGuestOSType> &aType); 402 HRESULT getGuestOS VariantsByFamilyId(const Utf8Str &strOSFamily,403 std::vector<com::Utf8Str> &aOS Variants);404 HRESULT getGuestOSDescsBy Variant(const Utf8Str &strOSVariant,402 HRESULT getGuestOSSubtypesByFamilyId(const Utf8Str &strOSFamily, 403 std::vector<com::Utf8Str> &aOSSubtypes); 404 HRESULT getGuestOSDescsBySubtype(const Utf8Str &strOSSubtype, 405 405 std::vector<com::Utf8Str> &aGuestOSDescs); 406 406 HRESULT createSharedFolder(const com::Utf8Str &aName, -
trunk/src/VBox/Main/src-all/Global.cpp
r101579 r101593 237 237 #define VBOX_LINUX_OSHINTS_D_X64 (VBOXOSHINT_RTCUTC | VBOXOSHINT_64BIT | VBOXOSHINT_X86_HWVIRTEX | VBOXOSHINT_X86_IOAPIC) 238 238 239 #define VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_sz Variant, 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, \ 240 240 a_NetworkAdapter, a_HDStorageController, a_HDStorageBusType) \ 241 { "Linux", "Linux", a_sz Variant, 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, \ 242 242 1, a_Memory, a_Vram, a_Diskspace * _1G64, GraphicsControllerType_VMSVGA, a_NetworkAdapter, 0, StorageControllerType_PIIX4, StorageBus_IDE, \ 243 243 a_HDStorageController, a_HDStorageBusType, ChipsetType_PIIX3, IommuType_None, AudioControllerType_AC97, AudioCodecType_AD1980 } 244 244 245 #define VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_sz Variant, 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, \ 246 246 a_NetworkAdapter, a_HDStorageController, a_HDStorageBusType) \ 247 { "Linux", "Linux", a_sz Variant, 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, \ 248 248 1, a_Memory, a_Vram, a_Diskspace * _1G64, GraphicsControllerType_VMSVGA, a_NetworkAdapter, 0, StorageControllerType_PIIX4, StorageBus_IDE, \ 249 249 a_HDStorageController, a_HDStorageBusType, ChipsetType_PIIX3, IommuType_None, AudioControllerType_AC97, AudioCodecType_AD1980 } 250 250 251 #define VBOX_LINUX_SUBTYPE_TEMPLATE_A64(a_sz Variant, 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, \ 252 252 a_NetworkAdapter, a_HDStorageController, a_HDStorageBusType) \ 253 { "Linux", "Linux", a_sz Variant, 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, \ 254 254 1, a_Memory, a_Vram, a_Diskspace * _1G64, GraphicsControllerType_VMSVGA, a_NetworkAdapter, 0, StorageControllerType_VirtioSCSI, StorageBus_VirtioSCSI, \ 255 255 a_HDStorageController, a_HDStorageBusType, ChipsetType_ARMv8Virtual, IommuType_None, AudioControllerType_HDA, AudioCodecType_STAC9221 } 256 256 257 #define VBOX_LINUX_SUBTYPE_TEMPLATE_ARM64(a_sz Variant, 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, \ 258 258 a_NetworkAdapter, a_HDStorageController, a_HDStorageBusType) \ 259 { "Linux", "Linux", a_sz Variant, 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, \ 260 260 1, a_Memory, a_Vram, a_Diskspace * _1G64, GraphicsControllerType_VMSVGA, a_NetworkAdapter, 0, StorageControllerType_VirtioSCSI, StorageBus_VirtioSCSI, \ 261 261 a_HDStorageController, a_HDStorageBusType, ChipsetType_ARMv8Virtual, IommuType_None, AudioControllerType_HDA, AudioCodecType_STAC9221 } 262 262 263 263 /* 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_sz Variant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \265 VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_sz Variant, 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, \ 266 266 NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA) 267 267 268 268 /* 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_sz Variant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \270 VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_sz Variant, 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, \ 271 271 NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA) 272 272 273 #define VBOX_LINUX_SUBTYPE_A_A64(a_sz Variant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \274 VBOX_LINUX_SUBTYPE_TEMPLATE_ARM64(a_sz Variant, 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, \ 275 275 NetworkAdapterType_I82540EM, StorageControllerType_VirtioSCSI, StorageBus_VirtioSCSI) 276 276 277 #define VBOX_LINUX_SUBTYPE_A_WITH_OSTYPE_X86(a_sz Variant, a_Id, a_Description, a_OStype, a_Memory, a_Vram, a_Diskspace) \278 VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_sz Variant, 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, \ 279 279 NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA) 280 280 281 #define VBOX_LINUX_SUBTYPE_A_WITH_OSTYPE_X64(a_sz Variant, a_Id, a_Description, a_OStype, a_Memory, a_Vram, a_Diskspace) \282 VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_sz Variant, 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, \ 283 283 NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA) 284 284 285 #define VBOX_LINUX_SUBTYPE_A_WITH_OSTYPE_A64(a_sz Variant, a_Id, a_Description, a_OStype, a_Memory, a_Vram, a_Diskspace) \286 VBOX_LINUX_SUBTYPE_TEMPLATE_A64(a_sz Variant, 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, \ 287 287 NetworkAdapterType_I82540EM, StorageControllerType_VirtioSCSI, StorageBus_VirtioSCSI) 288 288 289 289 /* 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_sz Variant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \291 VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_sz Variant, 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, \ 292 292 NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA) 293 293 294 294 /* 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_sz Variant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \296 VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_sz Variant, 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, \ 297 297 NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA) 298 298 299 #define VBOX_LINUX_SUBTYPE_B_A64(a_sz Variant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \300 VBOX_LINUX_SUBTYPE_TEMPLATE_ARM64(a_sz Variant, 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, \ 301 301 NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA) 302 302 303 303 /* 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_sz Variant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \305 VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_sz Variant, 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, \ 306 306 NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA) 307 307 308 308 /* 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_sz Variant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \310 VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_sz Variant, 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, \ 311 311 NetworkAdapterType_I82540EM, StorageControllerType_IntelAhci, StorageBus_SATA) 312 312 313 313 /* 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_sz Variant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \315 VBOX_LINUX_SUBTYPE_TEMPLATE_X86(a_sz Variant, 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, \ 316 316 NetworkAdapterType_Am79C973, StorageControllerType_PIIX4, StorageBus_IDE) 317 317 318 318 /* 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_sz Variant, a_Id, a_Description, a_Memory, a_Vram, a_Diskspace) \320 VBOX_LINUX_SUBTYPE_TEMPLATE_X64(a_sz Variant, 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, \ 321 321 NetworkAdapterType_I82540EM, StorageControllerType_PIIX4, StorageBus_IDE) 322 322 -
trunk/src/VBox/Main/src-server/GuestOSTypeImpl.cpp
r101215 r101593 100 100 unconst(mFamilyID) = ostype.familyId; 101 101 unconst(mFamilyDescription) = ostype.familyDescription; 102 unconst(mOS Variant) = ostype.variant;102 unconst(mOSSubtype) = ostype.subtype; 103 103 unconst(mID) = ostype.id; 104 104 unconst(mDescription) = ostype.description; … … 159 159 160 160 161 HRESULT GuestOSType::get Variant(com::Utf8Str &aVariant)162 { 163 /* mOS Variantis constant during life time, no need to lock */164 a Variant = mOSVariant;161 HRESULT GuestOSType::getSubtype(com::Utf8Str &aSubtype) 162 { 163 /* mOSSubtype is constant during life time, no need to lock */ 164 aSubtype = mOSSubtype; 165 165 166 166 return S_OK; -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r101471 r101593 4518 4518 /** 4519 4519 * 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. 4521 4521 * 4522 4522 * @param strOSFamily Guest OS family ID. 4523 * @param aOS Variants Where to store the list of guest OS variants.4523 * @param aOSSubtypes Where to store the list of guest OS subtypes. 4524 4524 * 4525 4525 * @note Locks the guest OS types list for reading. 4526 4526 */ 4527 HRESULT VirtualBox::getGuestOS VariantsByFamilyId(const Utf8Str &strOSFamily,4528 std::vector<com::Utf8Str> &aOS Variants)4529 { 4530 std::list<com::Utf8Str> allOS Variants;4527 HRESULT VirtualBox::getGuestOSSubtypesByFamilyId(const Utf8Str &strOSFamily, 4528 std::vector<com::Utf8Str> &aOSSubtypes) 4529 { 4530 std::list<com::Utf8Str> allOSSubtypes; 4531 4531 4532 4532 AutoReadLock alock(m->allGuestOSTypes.getLockHandle() COMMA_LOCKVAL_SRC_POS); … … 4556 4556 if (familyId.compare(strOSFamily, Utf8Str::CaseInsensitive) == 0) 4557 4557 { 4558 const Utf8Str &strOS Variant = (*it)->i_variant();4559 if (!strOS Variant.isEmpty())4560 allOS Variants.push_back(strOSVariant);4558 const Utf8Str &strOSSubtype = (*it)->i_subtype(); 4559 if (!strOSSubtype.isEmpty()) 4560 allOSSubtypes.push_back(strOSSubtype); 4561 4561 } 4562 4562 } 4563 4563 4564 4564 /* throw out any duplicates */ 4565 allOS Variants.sort();4566 allOS Variants.unique();4567 4568 aOS Variants.resize(allOSVariants.size());4565 allOSSubtypes.sort(); 4566 allOSSubtypes.unique(); 4567 4568 aOSSubtypes.resize(allOSSubtypes.size()); 4569 4569 size_t i = 0; 4570 for (std::list<com::Utf8Str>::const_iterator it = allOS Variants.begin();4571 it != allOS Variants.end(); ++it, ++i)4572 aOS Variants[i] = (*it);4570 for (std::list<com::Utf8Str>::const_iterator it = allOSSubtypes.begin(); 4571 it != allOSSubtypes.end(); ++it, ++i) 4572 aOSSubtypes[i] = (*it); 4573 4573 4574 4574 return S_OK; … … 4577 4577 /** 4578 4578 * 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 strOS Variant Guest OS variant.4579 * descriptions which correspond to the supplied guest OS subtype. 4580 * 4581 * @param strOSSubtype Guest OS subtype. 4582 4582 * @param aGuestOSDescs Where to store the list of guest OS descriptions.. 4583 4583 * 4584 4584 * @note Locks the guest OS types list for reading. 4585 4585 */ 4586 HRESULT VirtualBox::getGuestOSDescsBy Variant(const Utf8Str &strOSVariant,4586 HRESULT VirtualBox::getGuestOSDescsBySubtype(const Utf8Str &strOSSubtype, 4587 4587 std::vector<com::Utf8Str> &aGuestOSDescs) 4588 4588 { … … 4591 4591 AutoReadLock alock(m->allGuestOSTypes.getLockHandle() COMMA_LOCKVAL_SRC_POS); 4592 4592 4593 bool fFoundGuestOS Variant= false;4593 bool fFoundGuestOSSubtype = false; 4594 4594 for (GuestOSTypesOList::const_iterator it = m->allGuestOSTypes.begin(); 4595 4595 it != m->allGuestOSTypes.end(); ++it) 4596 4596 { 4597 const Utf8Str &guestOS Variant = (*it)->i_variant();4598 /* Only some guest OS types have a populated variantvalue. */4599 if (guestOS Variant.isNotEmpty() &&4600 guestOS Variant.compare(strOSVariant, Utf8Str::CaseInsensitive) == 0)4601 { 4602 fFoundGuestOS Variant= 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; 4603 4603 break; 4604 4604 } 4605 4605 } 4606 4606 4607 if (!fFoundGuestOS Variant)4607 if (!fFoundGuestOSSubtype) 4608 4608 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()); 4610 4610 4611 4611 for (GuestOSTypesOList::const_iterator it = m->allGuestOSTypes.begin(); 4612 4612 it != m->allGuestOSTypes.end(); ++it) 4613 4613 { 4614 const Utf8Str &guestOS Variant = (*it)->i_variant();4615 /* Only some guest OS types have a populated variantvalue. */4616 if (guestOS Variant.isNotEmpty() &&4617 guestOS Variant.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) 4618 4618 { 4619 4619 const Utf8Str &strOSDesc = (*it)->i_description();
Note:
See TracChangeset
for help on using the changeset viewer.