- Timestamp:
- Jan 13, 2011 3:12:10 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69420
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ovfreader.h
r35043 r35536 217 217 iprt::MiniString strOtherResourceType; 218 218 iprt::MiniString strResourceSubType; 219 bool fResourceRequired; 219 220 220 221 iprt::MiniString strHostResource; // "Abstractly specifies how a device shall connect to a resource on the deployment platform. -
trunk/src/VBox/Main/xml/ovfreader.cpp
r34501 r35536 423 423 pelmItemChild->copyValue(ulType); 424 424 i.resourceType = (ResourceType_T)ulType; 425 i.fResourceRequired = true; 426 const char *pcszAttValue; 427 if (pelmItem->getAttributeValue("required", pcszAttValue)) 428 { 429 if (!strcmp(pcszAttValue, "false")) 430 i.fResourceRequired = false; 431 } 425 432 } 426 433 else if (!strcmp(pcszItemChildName, "OtherResourceType")) … … 691 698 692 699 default: 693 throw OVFLogicError(N_("Error reading \"%s\": Unknown resource type %d in hardware item, line %d"), 694 m_strPath.c_str(), 695 i.resourceType, 696 i.ulLineNumber); 700 { 701 /* If this unknown resource type isn't required, we simply skip it. */ 702 if (i.fResourceRequired) 703 { 704 throw OVFLogicError(N_("Error reading \"%s\": Unknown resource type %d in hardware item, line %d"), 705 m_strPath.c_str(), 706 i.resourceType, 707 i.ulLineNumber); 708 } 709 } 697 710 } // end switch 698 711 }
Note:
See TracChangeset
for help on using the changeset viewer.