VirtualBox

Changeset 13580 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Oct 27, 2008 2:04:18 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38479
Message:

Ported s2 branch (r37120:38456).

Location:
trunk/src/VBox/Devices/Storage
Files:
5 edited

Legend:

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

    r12638 r13580  
    777777    int rc;
    778778
    779     /* Image must be opened and the new flags must be valid. Just readonly flag
    780      * is supported. */
    781     if (!pImage || uOpenFlags & ~VD_OPEN_FLAGS_READONLY)
     779    /* Image must be opened and the new flags must be valid. Just readonly and
     780     * info flags are supported. */
     781    if (!pImage || (uOpenFlags & ~(VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_INFO)))
    782782    {
    783783        rc = VERR_INVALID_PARAMETER;
  • trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp

    r13295 r13580  
    973973        rc = RTDirOpenFiltered(&pPluginDir, pszPluginFilter, RTDIRFILTER_WINNT);
    974974        if (RT_FAILURE(rc))
     975        {
     976            if (rc == VERR_FILE_NOT_FOUND)
     977            {
     978                /* VERR_FILE_NOT_FOUND would be interpreted as the hard
     979                 * disk storage unit was not found, so replace with
     980                 * VERR_NOT_SUPPORTED which is more meaningful in this case */
     981                rc = VERR_NOT_SUPPORTED;
     982            }
    975983            break;
     984        }
    976985
    977986        PRTDIRENTRYEX pPluginDirEntry = NULL;
  • trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp

    r13427 r13580  
    14201420static int vdiSetOpenFlags(void *pBackendData, unsigned uOpenFlags)
    14211421{
    1422     LogFlowFunc(("pBackendData=%#p\n uOpenFlags=%#x", pBackendData, uOpenFlags));
     1422    LogFlowFunc(("pBackendData=%#p uOpenFlags=%#x\n", pBackendData, uOpenFlags));
    14231423    PVDIIMAGEDESC pImage = (PVDIIMAGEDESC)pBackendData;
    14241424    int rc;
    14251425    const char *pszFilename;
    14261426
    1427     /* Image must be opened and the new flags must be valid. Just readonly flag
    1428      * is supported. */
    1429     if (!pImage || uOpenFlags & ~VD_OPEN_FLAGS_READONLY)
     1427    /* Image must be opened and the new flags must be valid. Just readonly and
     1428     * info flags are supported. */
     1429    if (!pImage || (uOpenFlags & ~(VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_INFO)))
    14301430    {
    14311431        rc = VERR_INVALID_PARAMETER;
  • trunk/src/VBox/Devices/Storage/VHDHDDCore.cpp

    r13571 r13580  
    775775    int rc;
    776776
    777     /* Image must be opened and the new flags must be valid. Just readonly flag
    778      * is supported. */
    779     if (!pImage || uOpenFlags & ~VD_OPEN_FLAGS_READONLY)
     777    /* Image must be opened and the new flags must be valid. Just readonly and
     778     * info flags are supported. */
     779    if (!pImage || (uOpenFlags & ~(VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_INFO)))
    780780    {
    781781        rc = VERR_INVALID_PARAMETER;
  • trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp

    r13295 r13580  
    46664666    int rc;
    46674667
    4668     /* Image must be opened and the new flags must be valid. Just readonly flag
    4669      * is supported. */
    4670     if (!pImage || uOpenFlags & ~(VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_ASYNC_IO))
     4668    /* Image must be opened and the new flags must be valid. Just readonly and
     4669     * info flags are supported. */
     4670    if (!pImage || (uOpenFlags & ~(VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_INFO | VD_OPEN_FLAGS_ASYNC_IO)))
    46714671    {
    46724672        rc = VERR_INVALID_PARAMETER;
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