VirtualBox

Ignore:
Timestamp:
Sep 16, 2020 3:39:09 PM (4 years ago)
Author:
vboxsync
Message:

Main: bugref:9224: Added NVME drives enumeration on Linux. Fixed the showing the model of the drive if additional info is not available

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r85929 r86134  
    16021602    {
    16031603        ComPtr<IHostDrive> pHostDrive = apHostDrives[i];
    1604 
     1604        /*
     1605         * The drive path and the model are obtained using different way
     1606         * outside of the IHostDrive object, therefore, they are defined
     1607         * even if another info is not available.
     1608         */
    16051609        com::Bstr bstrDrivePath;
    16061610        CHECK_ERROR(pHostDrive,COMGETTER(DrivePath)(bstrDrivePath.asOutParam()));
     
    16081612
    16091613        com::Bstr bstrModel;
     1614        CHECK_ERROR(pHostDrive,COMGETTER(Model)(bstrModel.asOutParam()));
     1615        if (bstrModel.isNotEmpty())
     1616            RTPrintf("Model:       %ls\n", bstrModel.raw());
     1617        else
     1618            RTPrintf("Model:       Unknown\n");
     1619
    16101620        com::Bstr bstrUuidDisk;
    16111621        ULONG cbSectorSize = 0;
     
    16131623        PartitioningType_T partitioningType;
    16141624        HRESULT hrc;
    1615         if (   SUCCEEDED(hrc = pHostDrive->COMGETTER(Model)(bstrModel.asOutParam()))
    1616             && SUCCEEDED(hrc = pHostDrive->COMGETTER(Uuid)(bstrUuidDisk.asOutParam()))
     1625        if (   SUCCEEDED(hrc = pHostDrive->COMGETTER(Uuid)(bstrUuidDisk.asOutParam()))
    16171626            && SUCCEEDED(hrc = pHostDrive->COMGETTER(SectorSize)(&cbSectorSize))
    16181627            && SUCCEEDED(hrc = pHostDrive->COMGETTER(Size)(&cbSize))
    16191628            && SUCCEEDED(hrc = pHostDrive->COMGETTER(PartitioningType)(&partitioningType)))
    16201629        {
    1621             if (bstrModel.isNotEmpty())
    1622                 RTPrintf("Model:       %ls\n", bstrModel.raw());
    1623             else
    1624                 RTPrintf("Model:       Unknown\n");
    1625 
    16261630            if (partitioningType == PartitioningType_GPT || com::Guid(bstrUuidDisk).isZero())
    16271631                RTPrintf("UUID:        %ls\n", bstrUuidDisk.raw());
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