Changeset 46068 in vbox for trunk/src/VBox/Main
- Timestamp:
- May 14, 2013 3:02:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/ovfreader.cpp
r45227 r46068 745 745 switch (i.resourceType) 746 746 { 747 case ResourceType_CDDrive: // 15 747 748 case ResourceType_HardDisk: // 17 748 749 { … … 761 762 ControllersMap::const_iterator it = vsys.mapControllers.find(i.ulParent); 762 763 if (it == vsys.mapControllers.end()) 763 throw OVFLogicError(N_("Error reading \"%s\": Hard disk item with instance ID %d specifies invalid parent %d, line %d"),764 throw OVFLogicError(N_("Error reading \"%s\": Disk item with instance ID %d specifies invalid parent %d, line %d"), 764 765 m_strPath.c_str(), 765 766 i.ulInstanceID, 766 767 i.ulParent, 767 768 i.ulLineNumber); 768 //const HardDiskController &hdc = it->second;769 769 770 770 VirtualDisk vd; … … 779 779 else if (i.strHostResource.startsWith("/disk/")) 780 780 vd.strDiskId = i.strHostResource.substr(6); 781 782 if ( !(vd.strDiskId.length()) 783 || (m_mapDisks.find(vd.strDiskId) == m_mapDisks.end()) 784 ) 785 throw OVFLogicError(N_("Error reading \"%s\": Hard disk item with instance ID %d specifies invalid host resource \"%s\", line %d"), 786 m_strPath.c_str(), 787 i.ulInstanceID, 788 i.strHostResource.c_str(), 789 i.ulLineNumber); 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 ) 788 throw OVFLogicError(N_("Error reading \"%s\": Disk item with instance ID %d specifies invalid host resource \"%s\", line %d"), 789 m_strPath.c_str(), 790 i.ulInstanceID, 791 i.strHostResource.c_str(), 792 i.ulLineNumber); 790 793 791 794 vsys.mapVirtualDisks[vd.strDiskId] = vd;
Note:
See TracChangeset
for help on using the changeset viewer.