VirtualBox

Changeset 39643 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Dec 16, 2011 10:54:38 AM (13 years ago)
Author:
vboxsync
Message:

SharedFolders: more fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r39531 r39643  
    72127212    AssertReturn(m_pVMMDev && m_pVMMDev->isShFlActive(), E_FAIL);
    72137213
    7214     VBOXHGCMSVCPARM parms[SHFL_CPARMS_ADD_MAPPING2];
     7214    VBOXHGCMSVCPARM parms[SHFL_CPARMS_ADD_MAPPING];
    72157215    SHFLSTRING *pFolderName, *pMapName;
    72167216    size_t cbString;
     7217
     7218    Bstr value;
     7219    HRESULT hrc = mMachine->GetExtraData(BstrFmt("VBoxInternal/SharedFoldersEnableSymlinksCreate/%s",
     7220                                                 strName.c_str()).raw(),
     7221                                         value.asOutParam());
     7222    bool fSymlinksCreate = hrc == S_OK && value == "1";
    72177223
    72187224    Log(("Adding shared folder '%s' -> '%s'\n", strName.c_str(), aData.m_strHostPath.c_str()));
     
    72757281
    72767282    parms[2].type = VBOX_HGCM_SVC_PARM_32BIT;
    7277     parms[2].u.uint32 = aData.m_fWritable;
    7278 
    7279     /*
    7280      * Auto-mount flag; is indicated by using the SHFL_CPARMS_ADD_MAPPING2
    7281      * define below.  This shows the host service that we have supplied
    7282      * an additional parameter (auto-mount) and keeps the actual command
    7283      * backwards compatible.
    7284      */
    7285     parms[3].type = VBOX_HGCM_SVC_PARM_32BIT;
    7286     parms[3].u.uint32 = aData.m_fAutoMount;
     7283    parms[2].u.uint32 = (aData.m_fWritable ? SHFL_ADD_MAPPING_F_WRITABLE : 0)
     7284                      | (aData.m_fAutoMount ? SHFL_ADD_MAPPING_F_AUTOMOUNT : 0)
     7285                      | (fSymlinksCreate ? SHFL_ADD_MAPPING_F_CREATE_SYMLINKS : 0);
    72877286
    72887287    vrc = m_pVMMDev->hgcmHostCall("VBoxSharedFolders",
    72897288                                  SHFL_FN_ADD_MAPPING,
    7290                                   SHFL_CPARMS_ADD_MAPPING2, &parms[0]);
     7289                                  SHFL_CPARMS_ADD_MAPPING, &parms[0]);
    72917290    RTMemFree(pFolderName);
    72927291    RTMemFree(pMapName);
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