VirtualBox

Changeset 80210 in vbox for trunk/src


Ignore:
Timestamp:
Aug 9, 2019 12:36:04 PM (5 years ago)
Author:
vboxsync
Message:

OVF: The bug with an empty medium fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp

    r80012 r80210  
    324324            if (FAILED(rc)) throw rc;
    325325
     326            rc = pHDA->COMGETTER(Port)(&lChannel);
     327            if (FAILED(rc)) throw rc;
     328
     329            rc = pHDA->COMGETTER(Device)(&lDevice);
     330            if (FAILED(rc)) throw rc;
     331
    326332            rc = pHDA->COMGETTER(Medium)(pMedium.asOutParam());
    327333            if (FAILED(rc)) throw rc;
    328 
    329             rc = pHDA->COMGETTER(Port)(&lChannel);
    330             if (FAILED(rc)) throw rc;
    331 
    332             rc = pHDA->COMGETTER(Device)(&lDevice);
    333             if (FAILED(rc)) throw rc;
     334            if (pMedium.isNull())
     335            {
     336                Utf8Str strStBus;
     337                if ( storageBus == StorageBus_IDE)
     338                strStBus = "IDE";
     339                else if ( storageBus == StorageBus_SATA)
     340                strStBus = "SATA";
     341                else if ( storageBus == StorageBus_SCSI)
     342                strStBus = "SCSI";
     343                else if ( storageBus == StorageBus_SAS)
     344                strStBus = "SAS";
     345                LogRel(("Warning: skip the medium (bus: %s, slot: %d, port: %d). No storage device attached.\n",
     346                strStBus.c_str(), lDevice, lChannel));
     347                continue;
     348            }
    334349
    335350            Utf8Str strTargetImageName;
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