VirtualBox

Changeset 78522 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 14, 2019 5:37:32 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
130562
Message:

FE/Qt: bugref:4551 and bugref:9440: A bit of missed code for UIConverterBackendGlobal to fix assertion triggered in storage settings on medium port change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r78513 r78522  
    405405            break;
    406406        }
     407        case 9:
     408        {
     409            KStorageBus bus = KStorageBus_PCIe;
     410            int iMaxPort = vboxGlobal().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(bus);
     411            LONG iPort = regExp.cap(1).toInt();
     412            LONG iDevice = 0;
     413            if (iPort < 0 || iPort > iMaxPort)
     414            {
     415                AssertMsgFailed(("No storage slot for text='%s'", strStorageSlot.toUtf8().constData()));
     416                break;
     417            }
     418            result.bus = bus;
     419            result.port = iPort;
     420            result.device = iDevice;
     421            break;
     422        }
     423        case 10:
     424        {
     425            KStorageBus bus = KStorageBus_VirtioSCSI;
     426            int iMaxPort = vboxGlobal().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(bus);
     427            LONG iPort = regExp.cap(1).toInt();
     428            LONG iDevice = 0;
     429            if (iPort < 0 || iPort > iMaxPort)
     430            {
     431                AssertMsgFailed(("No storage slot for text='%s'", strStorageSlot.toUtf8().constData()));
     432                break;
     433            }
     434            result.bus = bus;
     435            result.port = iPort;
     436            result.device = iDevice;
     437            break;
     438        }
    407439        default:
    408440        {
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette