VirtualBox

Ignore:
Timestamp:
Jul 8, 2009 9:18:57 PM (15 years ago)
Author:
vboxsync
Message:

Add,++: Switch to common addition kernel module.

Location:
trunk/src/VBox/Additions/x11/vboxmouse
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxmouse/VBoxUtils_68.c

    r21227 r21412  
    3535#endif
    3636
    37 #ifdef RT_OS_SOLARIS        /** @todo later Linux should also use R3 lib for this */
     37#ifndef RT_OS_LINUX        /** @todo later Linux should also use R3 lib for this */
    3838int VBoxMouseInit(void)
    3939{
     
    8282    return rc;
    8383}
    84 #else
    85 /* the vboxadd module file handle */
    86 static int g_vboxaddHandle = -1;
     84#else  /* RT_OS_LINUX */
     85/* the vboxguest module file handle */
     86static int g_vboxguestHandle = -1;
    8787/* the request structure */
    8888static VMMDevReqMouseStatus *g_vmmreqMouseStatus = NULL;
     
    9797
    9898    /* return immediately if already initialized */
    99     if (g_vboxaddHandle != -1)
     99    if (g_vboxguestHandle != -1)
    100100        return 0;
    101101
    102102    /* open the driver */
    103     g_vboxaddHandle = open(VBOXGUEST_DEVICE_NAME, O_RDWR, 0);
    104     if (g_vboxaddHandle < 0)
     103    g_vboxguestHandle = open(VBOXGUEST_DEVICE_NAME, O_RDWR, 0);
     104    if (g_vboxguestHandle < 0)
    105105    {
    106106        ErrorF("Unable to open the virtual machine device: %s\n",
     
    124124    req.pointerYPos = 0;
    125125/** @todo r=bird: Michael, I thought we decided a long time ago that all these should be replaced by VbglR3. I assume this is just a leftover... */
    126     if (ioctl(g_vboxaddHandle, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(req)), (void*)&req) < 0)
     126    if (ioctl(g_vboxguestHandle, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(req)), (void*)&req) < 0)
    127127    {
    128128        ErrorF("Error sending mouse pointer capabilities to VMM! rc = %d (%s)\n",
     
    145145{
    146146    /* If we failed to initialise, say that we don't want absolute co-ordinates. */
    147     if (g_vboxaddHandle < 0)
     147    if (g_vboxguestHandle < 0)
    148148        return 1;
    149149    /* perform VMM request */
    150150/** @todo r=bird: Michael, ditto. */
    151     if (ioctl(g_vboxaddHandle, VBOXGUEST_IOCTL_VMMREQUEST(vmmdevGetRequestSize(VMMDevReq_GetMouseStatus)), (void*)g_vmmreqMouseStatus) >= 0)
     151    if (ioctl(g_vboxguestHandle, VBOXGUEST_IOCTL_VMMREQUEST(vmmdevGetRequestSize(VMMDevReq_GetMouseStatus)), (void*)g_vmmreqMouseStatus) >= 0)
    152152    {
    153153        if (RT_SUCCESS(g_vmmreqMouseStatus->header.rc))
     
    177177    VMMDevReqMouseStatus req;
    178178    /* If we are not initialised, there is nothing to do */
    179     if (g_vboxaddHandle < 0)
     179    if (g_vboxguestHandle < 0)
    180180        return 0;
    181181    /* tell VMM that we no longer support absolute mouse handling */
     
    185185    req.pointerYPos = 0;
    186186/** @todo r=bird: Michael, ditto. */
    187     if (ioctl(g_vboxaddHandle, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(req)), (void*)&req) < 0)
    188     {
    189         ErrorF("ioctl to vboxadd module failed, rc = %d (%s)\n",
     187    if (ioctl(g_vboxguestHandle, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(req)), (void*)&req) < 0)
     188    {
     189        ErrorF("ioctl to vboxguest module failed, rc = %d (%s)\n",
    190190               errno, strerror(errno));
    191191    }
     
    193193    free(g_vmmreqMouseStatus);
    194194    g_vmmreqMouseStatus = NULL;
    195     close(g_vboxaddHandle);
    196     g_vboxaddHandle = -1;
     195    close(g_vboxguestHandle);
     196    g_vboxguestHandle = -1;
    197197    return 0;
    198198}
    199 #endif  /* !RT_OS_SOLARIS */
    200 
     199#endif  /* RT_OS_LINUX */
     200
  • trunk/src/VBox/Additions/x11/vboxmouse/vboxmouse_15.c

    r21227 r21412  
    195195
    196196    device = xf86CheckStrOption(dev->commonOptions, "Device",
    197                                 "/dev/vboxadd");
     197                                "/dev/vboxguest");
    198198
    199199    xf86Msg(X_CONFIG, "%s: Device: \"%s\"\n", pInfo->name, device);
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