- Timestamp:
- May 27, 2013 3:26:15 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 86035
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
r45068 r46290 801 801 { "--product", 'p', RTGETOPT_REQ_STRING }, 802 802 { "--producturl", 'P', RTGETOPT_REQ_STRING }, 803 { "--vendor", ' d', RTGETOPT_REQ_STRING },804 { "--vendorurl", ' D', RTGETOPT_REQ_STRING },803 { "--vendor", 'n', RTGETOPT_REQ_STRING }, 804 { "--vendorurl", 'N', RTGETOPT_REQ_STRING }, 805 805 { "--version", 'v', RTGETOPT_REQ_STRING }, 806 { "--description", 'd', RTGETOPT_REQ_STRING }, 806 807 { "--eula", 'e', RTGETOPT_REQ_STRING }, 807 808 { "--eulafile", 'E', RTGETOPT_REQ_STRING }, … … 874 875 break; 875 876 876 case ' d': // --vendor877 case 'n': // --vendor 877 878 if (ulCurVsys == (uint32_t)-1) 878 879 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong); … … 880 881 break; 881 882 882 case ' D': // --vendorurl883 case 'N': // --vendorurl 883 884 if (ulCurVsys == (uint32_t)-1) 884 885 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong); … … 890 891 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong); 891 892 mapArgsMapsPerVsys[ulCurVsys]["version"] = ValueUnion.psz; 893 break; 894 895 case 'd': // --description 896 if (ulCurVsys == (uint32_t)-1) 897 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong); 898 mapArgsMapsPerVsys[ulCurVsys]["description"] = ValueUnion.psz; 892 899 break; 893 900 … … 1010 1017 Bstr(itD->second).raw(), 1011 1018 Bstr(itD->second).raw()); 1019 else if (itD->first == "description") 1020 pVSD->AddDescription(VirtualSystemDescriptionType_Description, 1021 Bstr(itD->second).raw(), 1022 Bstr(itD->second).raw()); 1012 1023 else if (itD->first == "eula") 1013 1024 pVSD->AddDescription(VirtualSystemDescriptionType_License, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r46123 r46290 416 416 " [--vendorurl <vendor url>]\n" 417 417 " [--version <version info>]\n" 418 " [--description <description info>]\n" 418 419 " [--eula <license text>]\n" 419 420 " [--eulafile <filename>]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r46123 r46290 51 51 MODIFYVM_NAME = 1000, 52 52 MODIFYVM_GROUPS, 53 MODIFYVM_DESCRIPTION, 53 54 MODIFYVM_OSTYPE, 54 55 MODIFYVM_MEMORY, … … 211 212 { "--name", MODIFYVM_NAME, RTGETOPT_REQ_STRING }, 212 213 { "--groups", MODIFYVM_GROUPS, RTGETOPT_REQ_STRING }, 214 { "--description", MODIFYVM_DESCRIPTION, RTGETOPT_REQ_STRING }, 213 215 { "--ostype", MODIFYVM_OSTYPE, RTGETOPT_REQ_STRING }, 214 216 { "--memory", MODIFYVM_MEMORY, RTGETOPT_REQ_UINT32 }, … … 487 489 break; 488 490 } 491 case MODIFYVM_DESCRIPTION: 492 { 493 CHECK_ERROR(machine, COMSETTER(Description)(Bstr(ValueUnion.psz).raw())); 494 break; 495 } 489 496 case MODIFYVM_OSTYPE: 490 497 { -
trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
r46169 r46290 995 995 996 996 std::list<VirtualSystemDescriptionEntry*> llName = vsdescThis->findByType(VirtualSystemDescriptionType_Name); 997 if (llName.size() != 1) 998 throw setError(VBOX_E_NOT_SUPPORTED, 999 tr("Missing VM name")); 1000 Utf8Str &strVMName = llName.front()->strVboxCurrent; 997 if (!llName.size()) 998 throw setError(VBOX_E_NOT_SUPPORTED, tr("Missing VM name")); 999 Utf8Str &strVMName = llName.back()->strVboxCurrent; 1001 1000 pelmVirtualSystem->setAttribute("ovf:id", strVMName); 1002 1001 … … 1007 1006 std::list<VirtualSystemDescriptionEntry*> llVendorUrl = vsdescThis->findByType(VirtualSystemDescriptionType_VendorUrl); 1008 1007 std::list<VirtualSystemDescriptionEntry*> llVersion = vsdescThis->findByType(VirtualSystemDescriptionType_Version); 1009 bool fProduct = llProduct.size() && !llProduct. front()->strVboxCurrent.isEmpty();1010 bool fProductUrl = llProductUrl.size() && !llProductUrl. front()->strVboxCurrent.isEmpty();1011 bool fVendor = llVendor.size() && !llVendor. front()->strVboxCurrent.isEmpty();1012 bool fVendorUrl = llVendorUrl.size() && !llVendorUrl. front()->strVboxCurrent.isEmpty();1013 bool fVersion = llVersion.size() && !llVersion. front()->strVboxCurrent.isEmpty();1008 bool fProduct = llProduct.size() && !llProduct.back()->strVboxCurrent.isEmpty(); 1009 bool fProductUrl = llProductUrl.size() && !llProductUrl.back()->strVboxCurrent.isEmpty(); 1010 bool fVendor = llVendor.size() && !llVendor.back()->strVboxCurrent.isEmpty(); 1011 bool fVendorUrl = llVendorUrl.size() && !llVendorUrl.back()->strVboxCurrent.isEmpty(); 1012 bool fVersion = llVersion.size() && !llVersion.back()->strVboxCurrent.isEmpty(); 1014 1013 if (fProduct || 1015 1014 fProductUrl || … … 1038 1037 pelmAnnotationSection->createChild("Info")->addContent("Meta-information about the installed software"); 1039 1038 if (fProduct) 1040 pelmAnnotationSection->createChild("Product")->addContent(llProduct. front()->strVboxCurrent);1039 pelmAnnotationSection->createChild("Product")->addContent(llProduct.back()->strVboxCurrent); 1041 1040 if (fVendor) 1042 pelmAnnotationSection->createChild("Vendor")->addContent(llVendor. front()->strVboxCurrent);1041 pelmAnnotationSection->createChild("Vendor")->addContent(llVendor.back()->strVboxCurrent); 1043 1042 if (fVersion) 1044 pelmAnnotationSection->createChild("Version")->addContent(llVersion. front()->strVboxCurrent);1043 pelmAnnotationSection->createChild("Version")->addContent(llVersion.back()->strVboxCurrent); 1045 1044 if (fProductUrl) 1046 pelmAnnotationSection->createChild("ProductUrl")->addContent(llProductUrl. front()->strVboxCurrent);1045 pelmAnnotationSection->createChild("ProductUrl")->addContent(llProductUrl.back()->strVboxCurrent); 1047 1046 if (fVendorUrl) 1048 pelmAnnotationSection->createChild("VendorUrl")->addContent(llVendorUrl. front()->strVboxCurrent);1047 pelmAnnotationSection->createChild("VendorUrl")->addContent(llVendorUrl.back()->strVboxCurrent); 1049 1048 } 1050 1049 … … 1052 1051 std::list<VirtualSystemDescriptionEntry*> llDescription = vsdescThis->findByType(VirtualSystemDescriptionType_Description); 1053 1052 if (llDescription.size() && 1054 !llDescription. front()->strVboxCurrent.isEmpty())1053 !llDescription.back()->strVboxCurrent.isEmpty()) 1055 1054 { 1056 1055 /* <Section ovf:required="false" xsi:type="ovf:AnnotationSection_Type"> … … 1069 1068 1070 1069 pelmAnnotationSection->createChild("Info")->addContent("A human-readable annotation"); 1071 pelmAnnotationSection->createChild("Annotation")->addContent(llDescription. front()->strVboxCurrent);1070 pelmAnnotationSection->createChild("Annotation")->addContent(llDescription.back()->strVboxCurrent); 1072 1071 } 1073 1072 … … 1075 1074 std::list<VirtualSystemDescriptionEntry*> llLicense = vsdescThis->findByType(VirtualSystemDescriptionType_License); 1076 1075 if (llLicense.size() && 1077 !llLicense. front()->strVboxCurrent.isEmpty())1076 !llLicense.back()->strVboxCurrent.isEmpty()) 1078 1077 { 1079 1078 /* <EulaSection> … … 1091 1090 1092 1091 pelmEulaSection->createChild("Info")->addContent("License agreement for the virtual system"); 1093 pelmEulaSection->createChild("License")->addContent(llLicense. front()->strVboxCurrent);1092 pelmEulaSection->createChild("License")->addContent(llLicense.back()->strVboxCurrent); 1094 1093 } 1095 1094 1096 1095 // operating system 1097 1096 std::list<VirtualSystemDescriptionEntry*> llOS = vsdescThis->findByType(VirtualSystemDescriptionType_OS); 1098 if (llOS.size() != 1) 1099 throw setError(VBOX_E_NOT_SUPPORTED, 1100 tr("Missing OS type")); 1097 if (!llOS.size()) 1098 throw setError(VBOX_E_NOT_SUPPORTED, tr("Missing OS type")); 1101 1099 /* <OperatingSystemSection ovf:id="82"> 1102 1100 <Info>Guest Operating System</Info> 1103 1101 <Description>Linux 2.6.x</Description> 1104 1102 </OperatingSystemSection> */ 1105 VirtualSystemDescriptionEntry *pvsdeOS = llOS. front();1103 VirtualSystemDescriptionEntry *pvsdeOS = llOS.back(); 1106 1104 xml::ElementNode *pelmOperatingSystemSection; 1107 1105 if (enFormat == ovf::OVFVersion_0_9) … … 1959 1957 if (pDiskEntry->type == VirtualSystemDescriptionType_HardDiskImage) 1960 1958 { 1961 rc = pSourceDisk->exportFile(strTargetFilePath.c_str(), 1962 format, 1963 MediumVariant_VmdkStreamOptimized, 1959 rc = pSourceDisk->exportFile(strTargetFilePath.c_str(), 1960 format, 1961 MediumVariant_VmdkStreamOptimized, 1964 1962 pIfIo, 1965 pStorage, 1963 pStorage, 1966 1964 pProgress2); 1967 1965 if (FAILED(rc)) throw rc; … … 1972 1970 rc = pSourceDisk->exportFile(strTargetFilePath.c_str(), 1973 1971 formatTemp, 1974 MediumVariant_Standard, 1972 MediumVariant_Standard, 1975 1973 pIfIo, 1976 pStorage, 1974 pStorage, 1977 1975 pProgress2); 1978 1976 if (FAILED(rc)) throw rc;
Note:
See TracChangeset
for help on using the changeset viewer.