Changeset 8694 in vbox
- Timestamp:
- May 8, 2008 7:29:59 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30631
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/module/vboxmod.c
r8155 r8694 343 343 344 344 /** 345 * IOCTL handler. Disconnect a specific HGCM connection. 346 * 347 * @returns 0 on success, or a Linux kernel errno value 348 * @param filp the file structure with which the application opened the driver 349 * @param userspace_info userspace pointer to the hgcm connection information 350 * (VBoxGuestHGCMConnectInfo structure) 351 * @retval userspace_info userspace pointer to the hgcm connection information 352 */ 353 static int vboxadd_hgcm_disconnect(struct file *filp, unsigned long userspace_info) 354 { 355 VBoxGuestHGCMDisconnectInfo info; 356 if (0 != copy_from_user ((void *)&info, (void *)userspace_info, sizeof (info))) { 357 LogRelFunc (("IOCTL_VBOXGUEST_HGCM_DISCONNECT: can not get info\n")); 358 return -EFAULT; 359 } 360 LogRelFunc(("client ID %u\n", info.u32ClientID)); 361 vboxadd_cmc_call(vboxDev, IOCTL_VBOXGUEST_HGCM_DISCONNECT, &info); 362 if (copy_to_user ((void *)userspace_info, (void *)&info, sizeof(info))) { 363 LogRelFunc (("IOCTL_VBOXGUEST_HGCM_DISCONNECT: failed to return the connection structure\n")); 364 return -EFAULT; 365 } 366 return 0; 367 } 368 369 /** 345 370 * IOCtl handler. Control the interrupt filter mask to specify which VMMDev interrupts 346 371 * we know how to handle. … … 532 557 IOCTL_EXIT("IOCTL_VBOXGUEST_HGCM_CONNECT", arg); 533 558 break; 559 case IOCTL_VBOXGUEST_HGCM_DISCONNECT: 560 IOCTL_ENTRY("IOCTL_VBOXGUEST_HGCM_DISCONNECT", arg); 561 vboxadd_hgcm_disconnect(filp, arg); 562 IOCTL_EXIT("IOCTL_VBOXGUEST_HGCM_DISCONNECT", arg); 563 break; 534 564 case VBOXGUEST_IOCTL_CTL_FILTER_MASK: 535 565 {
Note:
See TracChangeset
for help on using the changeset viewer.