VirtualBox

Changeset 33355 in vbox


Ignore:
Timestamp:
Oct 22, 2010 1:47:08 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
66939
Message:

Storage/VBoxHDD: make diff/base image creation fail with an appropriate error if the backend cannot handle this

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VBoxHDD.cpp

    r33310 r33355  
    45334533            break;
    45344534        }
     4535        if (!(pImage->Backend->uBackendCaps & (  VD_CAP_CREATE_FIXED
     4536                                               | VD_CAP_CREATE_DYNAMIC)))
     4537        {
     4538            rc = vdError(pDisk, VERR_INVALID_PARAMETER, RT_SRC_POS,
     4539                         N_("VD: backend '%s' cannot create base images"), pszBackend);
     4540            break;
     4541        }
    45354542
    45364543        /* Create UUID if the caller didn't specify one. */
     
    47664773            rc = vdError(pDisk, VERR_INVALID_PARAMETER, RT_SRC_POS,
    47674774                         N_("VD: unknown backend name '%s'"), pszBackend);
     4775            break;
     4776        }
     4777        if (   !(pImage->Backend->uBackendCaps & VD_CAP_DIFF)
     4778            || !(pImage->Backend->uBackendCaps & (  VD_CAP_CREATE_FIXED
     4779                                                  | VD_CAP_CREATE_DYNAMIC)))
     4780        {
     4781            rc = vdError(pDisk, VERR_INVALID_PARAMETER, RT_SRC_POS,
     4782                         N_("VD: backend '%s' cannot create diff images"), pszBackend);
    47684783            break;
    47694784        }
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