VirtualBox

Changeset 102833 in vbox for trunk/src


Ignore:
Timestamp:
Jan 11, 2024 9:18:25 AM (13 months ago)
Author:
vboxsync
Message:

Guest Control: Added a flag for the get mount points HGCM API, so that we later can specify which mount points we want to get (or skip). bugref:10415

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp

    r102654 r102833  
    12741274 *
    12751275 * @param   pCtx                Guest control command context to use.
    1276  */
    1277 VBGLR3DECL(int) VbglR3GuestCtrlGetMountPoints(PVBGLR3GUESTCTRLCMDCTX pCtx)
    1278 {
    1279     AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
    1280     AssertReturn(pCtx->uNumParms == 1, VERR_INVALID_PARAMETER);
    1281 
    1282     int rc;
    1283     do
    1284     {
    1285         HGCMMsgPathUserHome Msg;
     1276 * @param   pfFlags             Where to return the get mount point flags on success.
     1277 */
     1278VBGLR3DECL(int) VbglR3GuestCtrlGetMountPoints(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *pfFlags)
     1279{
     1280    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
     1281    AssertReturn(pCtx->uNumParms == 2, VERR_INVALID_PARAMETER);
     1282    AssertPtrReturn(pfFlags, VERR_INVALID_POINTER);
     1283
     1284    int rc;
     1285    do
     1286    {
     1287        HGCMMsgMountPoints Msg;
    12861288        VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, vbglR3GuestCtrlGetMsgFunctionNo(pCtx->uClientID), pCtx->uNumParms);
    12871289        VbglHGCMParmUInt32Set(&Msg.context, HOST_MSG_MOUNT_POINTS);
     
    12891291        rc = VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));
    12901292        if (RT_SUCCESS(rc))
    1291             Msg.context.GetUInt32(&pCtx->uContextID);
     1293        {
     1294            Msg.context.GetUInt32(&pCtx->uContextID);
     1295            Msg.flags.GetUInt32(pfFlags);
     1296        }
    12921297    } while (rc == VERR_INTERRUPTED && g_fVbglR3GuestCtrlHavePeekGetCancel);
    12931298    return rc;
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp

    r102654 r102833  
    17661766     * Retrieve the request.
    17671767     */
    1768     int rc = VbglR3GuestCtrlGetMountPoints(pHostCtx);
    1769     if (RT_SUCCESS(rc))
    1770     {
     1768    uint32_t fFlags;
     1769    int rc = VbglR3GuestCtrlGetMountPoints(pHostCtx, &fFlags);
     1770    if (RT_SUCCESS(rc))
     1771    {
     1772        /* Note: fFlags is currently unused, so we simply ignore this here. */
     1773
    17711774        VGSVCMOUNTPOINTENUMCTX Ctx;
    17721775        Ctx.cb      = 0;
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r102831 r102833  
    31773177
    31783178    /* Prepare HGCM call. */
    3179     VBOXHGCMSVCPARM paParms[2];
     3179    VBOXHGCMSVCPARM paParms[4];
    31803180    int i = 0;
    31813181    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     3182    HGCMSvcSetU32(&paParms[i++], 0 /* fFlags, unused */);
    31823183
    31833184    alock.release(); /* Drop lock before sending. */
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