VirtualBox

Changeset 35124 in vbox for trunk/src


Ignore:
Timestamp:
Dec 15, 2010 12:06:11 PM (14 years ago)
Author:
vboxsync
Message:

Main/Machine: No need to treat Readonly media specially, as it is compatible with old versions since it doesn't apply to hard disks. Fixes BETA3 regression.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r35082 r35124  
    33993399    {
    34003400        MediumType_T mtype = medium->getType();
    3401         if (    mtype == MediumType_MultiAttach
    3402              || mtype == MediumType_Readonly
    3403            )
    3404         {
    3405             // These two types are new with VirtualBox 4.0 and therefore require settings
     3401        // MediumType_Readonly is also new, but only applies to DVDs and floppies.
     3402        // For DVDs it's not written to the config file, so needs no global config
     3403        // version bump. For floppies it's a new attribute "type", which is ignored
     3404        // by older VirtualBox version, so needs no global config version bump either.
     3405        // For hard disks this type is not accepted.
     3406        if (mtype == MediumType_MultiAttach)
     3407        {
     3408            // This type is new with VirtualBox 4.0 and therefore requires settings
    34063409            // version 1.11 in the settings backend. Unfortunately it is not enough to do
    34073410            // the usual routine in MachineConfigFile::bumpSettingsVersionIfNeeded() for
     
    34173420               )
    34183421                return setError(VBOX_E_INVALID_OBJECT_STATE,
    3419                                 tr("Cannot attach medium '%s': the media types 'MultiAttach' and 'Readonly' can only be attached "
     3422                                tr("Cannot attach medium '%s': the media type 'MultiAttach' can only be attached "
    34203423                                   "to machines that were created with VirtualBox 4.0 or later"),
    34213424                                medium->getLocationFull().c_str());
Note: See TracChangeset for help on using the changeset viewer.

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