VirtualBox

Changeset 7437 in vbox


Ignore:
Timestamp:
Mar 12, 2008 4:11:04 PM (17 years ago)
Author:
vboxsync
Message:

Additions/common: add ring 3 call to set guest capabilities and make vmmdevGetRequestSize work with the new request

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuest.h

    r7409 r7437  
    12541254        case VMMDevReq_ReportGuestCapabilities:
    12551255            return sizeof(VMMDevReqGuestCapabilities);
     1256        case VMMDevReq_SetGuestCapabilities:
     1257            return sizeof(VMMDevReqGuestCapabilities2);
    12561258#ifdef VBOX_HGCM
    12571259        case VMMDevReq_HGCMConnect:
     
    14041406VBGLR3DECL(int)     VbglR3CtlFilterMask(uint32_t fOr, uint32_t fNot);
    14051407VBGLR3DECL(int)     VbglR3Daemonize(bool fNoChDir, bool fNoClose);
     1408VBGLR3DECL(int)     VbglR3SetGuestCaps(uint32_t u32OrMask, uint32_t u32NotMask);
    14061409
    14071410/** @name Shared clipboard
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp

    r6557 r7437  
    2020*   Header Files                                                               *
    2121*******************************************************************************/
     22#include <VBox/log.h>
     23
    2224#include "VBGLR3Internal.h"
    23 
    2425
    2526/**
     
    7980    return vbglR3DoIOCtl(VBOXGUEST_IOCTL_CTL_FILTER_MASK, &Info, sizeof(Info));
    8081}
     82
     83
     84/**
     85 * Report a change in the capabilities that we support to the host.
     86 *
     87 * @returns IPRT status value
     88 * @param   u32OrMask  Capabilities which have been added
     89 * @param   u32NotMask Capabilities which have been removed
     90 */
     91VBGLR3DECL(int) VbglR3SetGuestCaps(uint32_t u32OrMask, uint32_t u32NotMask)
     92{
     93    VMMDevReqGuestCapabilities2 vmmreqGuestCaps;
     94    int rc = VINF_SUCCESS;
     95
     96    vmmdevInitRequest(&vmmreqGuestCaps.header, VMMDevReq_SetGuestCapabilities);
     97    vmmreqGuestCaps.u32OrMask = u32OrMask;
     98    vmmreqGuestCaps.u32NotMask = u32NotMask;
     99    rc = vbglR3GRPerform(&vmmreqGuestCaps.header);
     100#ifdef DEBUG
     101    if (RT_SUCCESS(rc))
     102        LogRel(("Successfully changed guest capabilities: or mask 0x%x, not mask 0x%x.\n",
     103                u32OrMask, u32NotMask));
     104    else
     105        LogRel(("Failed to change guest capabilities: or mask 0x%x, not mask 0x%x.  rc = %Rrc.\n",
     106                u32OrMask, u32NotMask, rc));
     107#endif
     108    return rc;
     109}
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