VirtualBox

Changeset 39799 in vbox for trunk


Ignore:
Timestamp:
Jan 18, 2012 5:40:09 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
75773
Message:

Main/Medium: Add field for default open flags and add VD_OPEN_FLAGS_IGNORE_FLUSH for now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r38818 r39799  
    9797          hostDrive(false),
    9898          implicit(false),
     99          uOpenFlagsDef(VD_OPEN_FLAGS_IGNORE_FLUSH),
    99100          numCreateDiffTasks(0),
    100101          vdDiskIfaces(NULL),
     
    153154
    154155    bool implicit : 1;
     156
     157    /** Default flags passed to VDOpen(). */
     158    unsigned uOpenFlagsDef;
    155159
    156160    uint32_t numCreateDiffTasks;
     
    49124916                             pMedium->m->strFormat.c_str(),
    49134917                             pMedium->m->strLocationFull.c_str(),
    4914                              VD_OPEN_FLAGS_READONLY,
     4918                             VD_OPEN_FLAGS_READONLY | m->uOpenFlagsDef,
    49154919                             pMedium->m->vdImageIfaces);
    49164920                if (RT_FAILURE(vrc))
     
    49264930                             (*it)->m->strFormat.c_str(),
    49274931                             (*it)->m->strLocationFull.c_str(),
    4928                              VD_OPEN_FLAGS_INFO,
     4932                             VD_OPEN_FLAGS_INFO | m->uOpenFlagsDef,
    49294933                             (*it)->m->vdImageIfaces);
    49304934                if (RT_FAILURE(vrc))
     
    54005404                         format.c_str(),
    54015405                         location.c_str(),
    5402                          uOpenFlags,
     5406                         uOpenFlags | m->uOpenFlagsDef,
    54035407                         m->vdImageIfaces);
    54045408            if (RT_FAILURE(vrc))
     
    56515655                             format.c_str(),
    56525656                             location.c_str(),
    5653                              uOpenFlags & ~VD_OPEN_FLAGS_READONLY,
     5657                             (uOpenFlags & ~VD_OPEN_FLAGS_READONLY) | m->uOpenFlagsDef,
    56545658                             m->vdImageIfaces);
    56555659                if (RT_FAILURE(vrc))
     
    64646468                               &geo,
    64656469                               id.raw(),
    6466                                VD_OPEN_FLAGS_NORMAL,
     6470                               VD_OPEN_FLAGS_NORMAL | m->uOpenFlagsDef,
    64676471                               m->vdImageIfaces,
    64686472                               task.mVDOperationIfaces);
     
    66036607                             pMedium->m->strFormat.c_str(),
    66046608                             pMedium->m->strLocationFull.c_str(),
    6605                              VD_OPEN_FLAGS_READONLY,
     6609                             VD_OPEN_FLAGS_READONLY | m->uOpenFlagsDef,
    66066610                             pMedium->m->vdImageIfaces);
    66076611                if (RT_FAILURE(vrc))
     
    66276631                               targetId.raw(),
    66286632                               id.raw(),
    6629                                VD_OPEN_FLAGS_NORMAL,
     6633                               VD_OPEN_FLAGS_NORMAL | m->uOpenFlagsDef,
    66306634                               pTarget->m->vdImageIfaces,
    66316635                               task.mVDOperationIfaces);
     
    68076811                             pMedium->m->strFormat.c_str(),
    68086812                             pMedium->m->strLocationFull.c_str(),
    6809                              uOpenFlags,
     6813                             uOpenFlags | m->uOpenFlagsDef,
    68106814                             pMedium->m->vdImageIfaces);
    68116815                if (RT_FAILURE(vrc))
     
    68396843                                     (*it)->m->strFormat.c_str(),
    68406844                                     (*it)->m->strLocationFull.c_str(),
    6841                                      VD_OPEN_FLAGS_INFO,
     6845                                     VD_OPEN_FLAGS_INFO | m->uOpenFlagsDef,
    68426846                                     (*it)->m->vdImageIfaces);
    68436847                        if (RT_FAILURE(vrc))
     
    70937097                             pMedium->m->strFormat.c_str(),
    70947098                             pMedium->m->strLocationFull.c_str(),
    7095                              VD_OPEN_FLAGS_READONLY,
     7099                             VD_OPEN_FLAGS_READONLY | m->uOpenFlagsDef,
    70967100                             pMedium->m->vdImageIfaces);
    70977101                if (RT_FAILURE(vrc))
     
    71627166                                 pMedium->m->strFormat.c_str(),
    71637167                                 pMedium->m->strLocationFull.c_str(),
    7164                                  uOpenFlags,
     7168                                 uOpenFlags | m->uOpenFlagsDef,
    71657169                                 pMedium->m->vdImageIfaces);
    71667170                    if (RT_FAILURE(vrc))
     
    71837187                                 task.mVariant & ~MediumVariant_NoCreateDir,
    71847188                                 targetId.raw(),
    7185                                  VD_OPEN_FLAGS_NORMAL,
     7189                                 VD_OPEN_FLAGS_NORMAL | m->uOpenFlagsDef,
    71867190                                 NULL /* pVDIfsOperation */,
    71877191                                 pTarget->m->vdImageIfaces,
     
    72017205                                   task.mVariant & ~MediumVariant_NoCreateDir,
    72027206                                   targetId.raw(),
    7203                                    VD_OPEN_FLAGS_NORMAL,
     7207                                   VD_OPEN_FLAGS_NORMAL | m->uOpenFlagsDef,
    72047208                                   NULL /* pVDIfsOperation */,
    72057209                                   pTarget->m->vdImageIfaces,
     
    73497353                         format.c_str(),
    73507354                         location.c_str(),
    7351                          VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_INFO,
     7355                         VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_INFO | m->uOpenFlagsDef,
    73527356                         m->vdImageIfaces);
    73537357            if (RT_SUCCESS(vrc))
     
    74477451                             pMedium->m->strFormat.c_str(),
    74487452                             pMedium->m->strLocationFull.c_str(),
    7449                              VD_OPEN_FLAGS_READONLY,
     7453                             VD_OPEN_FLAGS_READONLY | m->uOpenFlagsDef,
    74507454                             pMedium->m->vdImageIfaces);
    74517455                if (RT_FAILURE(vrc))
     
    74717475                         parentFormat.c_str(),
    74727476                         parentLocation.c_str(),
    7473                          VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_INFO,
     7477                         VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_INFO | m->uOpenFlagsDef,
    74747478                         m->vdImageIfaces);
    74757479            if (RT_FAILURE(vrc))
     
    75777581                             pMedium->m->strFormat.c_str(),
    75787582                             pMedium->m->strLocationFull.c_str(),
    7579                              (it == mediumListLast) ? VD_OPEN_FLAGS_NORMAL : VD_OPEN_FLAGS_READONLY,
     7583                             m->uOpenFlagsDef | (it == mediumListLast) ? VD_OPEN_FLAGS_NORMAL : VD_OPEN_FLAGS_READONLY,
    75807584                             pMedium->m->vdImageIfaces);
    75817585                if (RT_FAILURE(vrc))
     
    76747678                             pMedium->m->strFormat.c_str(),
    76757679                             pMedium->m->strLocationFull.c_str(),
    7676                              (it == mediumListLast) ? VD_OPEN_FLAGS_NORMAL : VD_OPEN_FLAGS_READONLY,
     7680                             m->uOpenFlagsDef | (it == mediumListLast) ? VD_OPEN_FLAGS_NORMAL : VD_OPEN_FLAGS_READONLY,
    76777681                             pMedium->m->vdImageIfaces);
    76787682                if (RT_FAILURE(vrc))
     
    77687772                             pMedium->m->strFormat.c_str(),
    77697773                             pMedium->m->strLocationFull.c_str(),
    7770                              VD_OPEN_FLAGS_READONLY,
     7774                             VD_OPEN_FLAGS_READONLY | m->uOpenFlagsDef,
    77717775                             pMedium->m->vdImageIfaces);
    77727776                if (RT_FAILURE(vrc))
     
    78917895                         task.mFormat->getId().c_str(),
    78927896                         task.mFilename.c_str(),
    7893                          VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_SEQUENTIAL,
     7897                         VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_SEQUENTIAL | m->uOpenFlagsDef,
    78947898                         task.mVDImageIfaces);
    78957899            if (RT_FAILURE(vrc))
     
    79587962                                 pMedium->m->strFormat.c_str(),
    79597963                                 pMedium->m->strLocationFull.c_str(),
    7960                                  uOpenFlags,
     7964                                 uOpenFlags | m->uOpenFlagsDef,
    79617965                                 pMedium->m->vdImageIfaces);
    79627966                    if (RT_FAILURE(vrc))
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