VirtualBox

Changeset 46140 in vbox


Ignore:
Timestamp:
May 17, 2013 10:12:22 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
85836
Message:

issue 5429. Support CD/DVD images attached to IDE/SATA during OVF import/export.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/ovfreader.cpp

    r46068 r46140  
    746746                {
    747747                    case ResourceType_CDDrive: // 15
     748                        /*  <Item ovf:required="false">
     749                                <rasd:Caption>cdrom1</rasd:Caption>
     750                                <rasd:InstanceId>7</rasd:InstanceId>
     751                                <rasd:ResourceType>15</rasd:ResourceType>
     752                                <rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
     753                                <rasd:Parent>5</rasd:Parent>
     754                                <rasd:AddressOnParent>0</rasd:AddressOnParent>
     755                            </Item> */
    748756                    case ResourceType_HardDisk: // 17
    749757                    {
     
    779787                        else if (i.strHostResource.startsWith("/disk/"))
    780788                            vd.strDiskId = i.strHostResource.substr(6);
    781                         else
    782                             vd.strDiskId = i.strElementName;//assign default name using value from the field
    783                                                             //<rasd:ElementName>element name</rasd:ElementName>
    784 
    785                       if ((!(vd.strDiskId.length())
    786                           || (m_mapDisks.find(vd.strDiskId) == m_mapDisks.end()))
    787                           )
     789
     790                        //the error may be missed for CD, because CD can be empty
     791                        if ((vd.strDiskId.isEmpty() || (m_mapDisks.find(vd.strDiskId) == m_mapDisks.end()))
     792                             && i.resourceType == ResourceType_HardDisk)
    788793                          throw OVFLogicError(N_("Error reading \"%s\": Disk item with instance ID %d specifies invalid host resource \"%s\", line %d"),
    789794                                              m_strPath.c_str(),
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