Changeset 21412 in vbox for trunk/src/VBox/Additions/x11/vboxmouse
- Timestamp:
- Jul 8, 2009 9:18:57 PM (15 years ago)
- 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 35 35 #endif 36 36 37 #if def 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 */ 38 38 int VBoxMouseInit(void) 39 39 { … … 82 82 return rc; 83 83 } 84 #else 85 /* the vbox addmodule file handle */86 static int g_vbox addHandle = -1;84 #else /* RT_OS_LINUX */ 85 /* the vboxguest module file handle */ 86 static int g_vboxguestHandle = -1; 87 87 /* the request structure */ 88 88 static VMMDevReqMouseStatus *g_vmmreqMouseStatus = NULL; … … 97 97 98 98 /* return immediately if already initialized */ 99 if (g_vbox addHandle != -1)99 if (g_vboxguestHandle != -1) 100 100 return 0; 101 101 102 102 /* open the driver */ 103 g_vbox addHandle = open(VBOXGUEST_DEVICE_NAME, O_RDWR, 0);104 if (g_vbox addHandle < 0)103 g_vboxguestHandle = open(VBOXGUEST_DEVICE_NAME, O_RDWR, 0); 104 if (g_vboxguestHandle < 0) 105 105 { 106 106 ErrorF("Unable to open the virtual machine device: %s\n", … … 124 124 req.pointerYPos = 0; 125 125 /** @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_vbox addHandle, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(req)), (void*)&req) < 0)126 if (ioctl(g_vboxguestHandle, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(req)), (void*)&req) < 0) 127 127 { 128 128 ErrorF("Error sending mouse pointer capabilities to VMM! rc = %d (%s)\n", … … 145 145 { 146 146 /* If we failed to initialise, say that we don't want absolute co-ordinates. */ 147 if (g_vbox addHandle < 0)147 if (g_vboxguestHandle < 0) 148 148 return 1; 149 149 /* perform VMM request */ 150 150 /** @todo r=bird: Michael, ditto. */ 151 if (ioctl(g_vbox addHandle, 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) 152 152 { 153 153 if (RT_SUCCESS(g_vmmreqMouseStatus->header.rc)) … … 177 177 VMMDevReqMouseStatus req; 178 178 /* If we are not initialised, there is nothing to do */ 179 if (g_vbox addHandle < 0)179 if (g_vboxguestHandle < 0) 180 180 return 0; 181 181 /* tell VMM that we no longer support absolute mouse handling */ … … 185 185 req.pointerYPos = 0; 186 186 /** @todo r=bird: Michael, ditto. */ 187 if (ioctl(g_vbox addHandle, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(req)), (void*)&req) < 0)188 { 189 ErrorF("ioctl to vbox addmodule 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", 190 190 errno, strerror(errno)); 191 191 } … … 193 193 free(g_vmmreqMouseStatus); 194 194 g_vmmreqMouseStatus = NULL; 195 close(g_vbox addHandle);196 g_vbox addHandle = -1;195 close(g_vboxguestHandle); 196 g_vboxguestHandle = -1; 197 197 return 0; 198 198 } 199 #endif /* !RT_OS_SOLARIS*/200 199 #endif /* RT_OS_LINUX */ 200 -
trunk/src/VBox/Additions/x11/vboxmouse/vboxmouse_15.c
r21227 r21412 195 195 196 196 device = xf86CheckStrOption(dev->commonOptions, "Device", 197 "/dev/vbox add");197 "/dev/vboxguest"); 198 198 199 199 xf86Msg(X_CONFIG, "%s: Device: \"%s\"\n", pInfo->name, device);
Note:
See TracChangeset
for help on using the changeset viewer.