VirtualBox

Changeset 35136 in vbox for trunk/src


Ignore:
Timestamp:
Dec 15, 2010 2:40:30 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
68973
Message:

Frontends/VBoxManage: small functionality/error handling fix with setting the medium type with storageattach

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp

    r35115 r35136  
    7373    ULONG device = ~0U;
    7474    bool fForceUnmount = false;
     75    bool fSetMediumType = false;
    7576    MediumType_T mediumType = MediumType_Normal;
    7677    Bstr bstrComment;
     
    215216                if (RT_FAILURE(vrc))
    216217                    return errorArgument("Invalid hard disk type '%s'", ValueUnion.psz);
     218                fSetMediumType = true;
    217219                break;
    218220            }
     
    559561
    560562            // set medium type, if so desired
    561             if (pMedium2Mount && mediumType != MediumType_Normal)
     563            if (pMedium2Mount && fSetMediumType)
    562564            {
    563565                CHECK_ERROR(pMedium2Mount, COMSETTER(Type)(mediumType));
     566                throw  Utf8Str("Failed to set the medium type");
    564567            }
    565568
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette