- Timestamp:
- Sep 27, 2023 9:51:39 AM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r101180 r101288 792 792 pPlatformProperties->GetMaxInstancesOfStorageBus(enmChipsetType, StorageBus_Floppy, &ulValue); 793 793 RTPrintf(List::tr("Maximum %s Floppy Controllers:%u\n"), pszChipset, ulValue); 794 795 return S_OK; 796 } 797 798 /** 799 * Lists guest OS types. 800 * 801 * @returns HRESULT 802 * @param aGuestOSTypes Reference to guest OS types to list. 803 */ 804 static HRESULT listGuestOSTypes(const com::SafeIfaceArray<IGuestOSType> &aGuestOSTypes) 805 { 806 /* 807 * Iterate through the collection. 808 */ 809 for (size_t i = 0; i < aGuestOSTypes.size(); ++i) 810 { 811 ComPtr<IGuestOSType> guestOS; 812 guestOS = aGuestOSTypes[i]; 813 Bstr guestId; 814 guestOS->COMGETTER(Id)(guestId.asOutParam()); 815 RTPrintf("ID: %ls\n", guestId.raw()); 816 Bstr guestDescription; 817 guestOS->COMGETTER(Description)(guestDescription.asOutParam()); 818 RTPrintf(List::tr("Description: %ls\n"), guestDescription.raw()); 819 Bstr familyId; 820 guestOS->COMGETTER(FamilyId)(familyId.asOutParam()); 821 RTPrintf(List::tr("Family ID: %ls\n"), familyId.raw()); 822 Bstr familyDescription; 823 guestOS->COMGETTER(FamilyDescription)(familyDescription.asOutParam()); 824 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()); 829 BOOL is64Bit; 830 guestOS->COMGETTER(Is64Bit)(&is64Bit); 831 RTPrintf(List::tr("64 bit: %RTbool\n"), is64Bit); 832 RTPrintf("\n"); 833 } 794 834 795 835 return S_OK; … … 853 893 listPlatformChipsetProperties(platformProperties, saChipset[i]); 854 894 } 895 896 RTPrintf("\n"); 897 898 RTPrintf(List::tr("Supported guest OS types:\n\n")); 899 900 com::SafeIfaceArray<IGuestOSType> coll; 901 platformProperties->GetSupportedGuestOSTypes(ComSafeArrayAsOutParam(coll)); 902 listGuestOSTypes(coll); 855 903 856 904 return S_OK; … … 2156 2204 hrc = pVirtualBox->COMGETTER(GuestOSTypes)(ComSafeArrayAsOutParam(coll)); 2157 2205 if (SUCCEEDED(hrc)) 2158 { 2159 /* 2160 * Iterate through the collection. 2161 */ 2162 for (size_t i = 0; i < coll.size(); ++i) 2163 { 2164 ComPtr<IGuestOSType> guestOS; 2165 guestOS = coll[i]; 2166 Bstr guestId; 2167 guestOS->COMGETTER(Id)(guestId.asOutParam()); 2168 RTPrintf("ID: %ls\n", guestId.raw()); 2169 Bstr guestDescription; 2170 guestOS->COMGETTER(Description)(guestDescription.asOutParam()); 2171 RTPrintf(List::tr("Description: %ls\n"), guestDescription.raw()); 2172 Bstr familyId; 2173 guestOS->COMGETTER(FamilyId)(familyId.asOutParam()); 2174 RTPrintf(List::tr("Family ID: %ls\n"), familyId.raw()); 2175 Bstr familyDescription; 2176 guestOS->COMGETTER(FamilyDescription)(familyDescription.asOutParam()); 2177 RTPrintf(List::tr("Family Desc: %ls\n"), familyDescription.raw()); 2178 Bstr guestOSVariant; 2179 guestOS->COMGETTER(Variant)(guestOSVariant.asOutParam()); 2180 if (guestOSVariant.isNotEmpty()) 2181 RTPrintf(List::tr("OS Variant: %ls\n"), guestOSVariant.raw()); 2182 BOOL is64Bit; 2183 guestOS->COMGETTER(Is64Bit)(&is64Bit); 2184 RTPrintf(List::tr("64 bit: %RTbool\n"), is64Bit); 2185 RTPrintf("\n"); 2186 } 2187 } 2206 listGuestOSTypes(coll); 2188 2207 break; 2189 2208 }
Note:
See TracChangeset
for help on using the changeset viewer.