Changeset 35037 in vbox
- Timestamp:
- Dec 13, 2010 4:59:49 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r34888 r35037 482 482 { "--variant", 'm', RTGETOPT_REQ_STRING }, 483 483 { "-variant", 'm', RTGETOPT_REQ_STRING }, 484 { "--type", 't', RTGETOPT_REQ_STRING },485 { "-type", 't', RTGETOPT_REQ_STRING },486 { "--remember", 'r', RTGETOPT_REQ_NOTHING },487 { "-remember", 'r', RTGETOPT_REQ_NOTHING },488 { "--register", 'r', RTGETOPT_REQ_NOTHING },489 { "-register", 'r', RTGETOPT_REQ_NOTHING },490 484 }; 491 485 … … 498 492 MediumVariant_T DiskVariant = MediumVariant_Standard; 499 493 bool fExisting = false; 500 bool fRemember = false;501 bool fSetDiskType = false;502 MediumType_T DiskType = MediumType_Normal;503 494 504 495 int c; … … 532 523 if (RT_FAILURE(vrc)) 533 524 return errorArgument("Invalid hard disk variant '%s'", ValueUnion.psz); 534 break;535 536 case 'r': // --remember537 fRemember = true;538 break;539 540 case 't': // --type541 vrc = parseDiskType(ValueUnion.psz, &DiskType);542 if (RT_FAILURE(vrc))543 return errorArgument("Invalid hard disk type '%s'", ValueUnion.psz);544 fSetDiskType = true;545 525 break; 546 526 … … 641 621 dstDisk.asOutParam())); 642 622 } 643 else if (SUCCEEDED(rc)) 644 fDstUnknown = true; 645 else 623 else if (FAILED(rc)) 646 624 { 647 625 com::GluePrintRCMessage(rc); 648 626 break; 649 627 } 628 629 /* If the image wasn't opened before, close it at the end. */ 630 if (SUCCEEDED(rc)) 631 fDstUnknown = true; 650 632 } 651 else652 fRemember = true;653 633 if (SUCCEEDED(rc)) 654 634 { … … 691 671 while (0); 692 672 693 if ( !fRemember&& !dstDisk.isNull())673 if (fDstUnknown && !dstDisk.isNull()) 694 674 { 695 675 /* forget the created clone */ 696 676 dstDisk->Close(); 697 677 } 698 else if (fSetDiskType)699 {700 CHECK_ERROR(dstDisk, COMSETTER(Type)(DiskType));701 }702 703 678 if (fSrcUnknown) 704 679 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r34971 r35037 503 503 " [--format VDI|VMDK|VHD|RAW|<other>]\n" 504 504 " [--variant Standard,Fixed,Split2G,Stream,ESX]\n" 505 " [--type normal|writethrough|immutable|shareable]\n" 506 " [--remember] [--existing]\n" 505 " [--existing]\n" 507 506 "\n"); 508 507
Note:
See TracChangeset
for help on using the changeset viewer.