Changeset 33439 in vbox for trunk/src/VBox/Additions/common/VBoxGuestLib
- Timestamp:
- Oct 25, 2010 7:35:58 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxGuestLib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c
r32311 r33439 40 40 41 41 #define SHFL_CPARMS_SET_UTF8 0 42 #define SHFL_CPARMS_SET_SYMLINKS 0 42 43 43 44 #define VBOX_INIT_CALL(a, b, c) \ … … 681 682 } 682 683 684 DECLVBGL(int) vboxReadLink (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING pParsedPath, 685 uint32_t cbBuffer, uint8_t *pBuffer) 686 { 687 int rc = VINF_SUCCESS; 688 689 VBoxSFReadLink data; 690 691 VBOX_INIT_CALL(&data.callInfo, READLINK, pClient); 692 693 data.root.type = VMMDevHGCMParmType_32bit; 694 data.root.u.value32 = pMap->root; 695 696 data.path.type = VMMDevHGCMParmType_LinAddr_In; 697 data.path.u.Pointer.size = ShflStringSizeOfBuffer (pParsedPath); 698 data.path.u.Pointer.u.linearAddr = (uintptr_t)pParsedPath; 699 700 data.buffer.type = VMMDevHGCMParmType_LinAddr_Out; 701 data.buffer.u.Pointer.size = cbBuffer; 702 data.buffer.u.Pointer.u.linearAddr = (uintptr_t)pBuffer; 703 704 rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data)); 705 706 /* Log(("VBOXSF: VBoxSF::vboxCallReadline: " 707 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 708 */ 709 if (RT_SUCCESS (rc)) 710 { 711 rc = data.callInfo.result; 712 } 713 return rc; 714 } 715 716 DECLVBGL(int) vboxCallSymlink (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING pNewPath, PSHFLSTRING pOldPath, PRTFSOBJINFO pBuffer) 717 { 718 int rc = VINF_SUCCESS; 719 720 VBoxSFSymlink data; 721 722 VBOX_INIT_CALL(&data.callInfo, SYMLINK, pClient); 723 724 data.root.type = VMMDevHGCMParmType_32bit; 725 data.root.u.value32 = pMap->root; 726 727 data.newPath.type = VMMDevHGCMParmType_LinAddr_In; 728 data.newPath.u.Pointer.size = ShflStringSizeOfBuffer (pNewPath); 729 data.newPath.u.Pointer.u.linearAddr = (uintptr_t)pNewPath; 730 731 data.oldPath.type = VMMDevHGCMParmType_LinAddr_In; 732 data.oldPath.u.Pointer.size = ShflStringSizeOfBuffer (pOldPath); 733 data.oldPath.u.Pointer.u.linearAddr = (uintptr_t)pOldPath; 734 735 data.info.type = VMMDevHGCMParmType_LinAddr_Out; 736 data.info.u.Pointer.size = sizeof(RTFSOBJINFO); 737 data.info.u.Pointer.u.linearAddr = (uintptr_t)pBuffer; 738 739 rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data)); 740 741 /* Log(("VBOXSF: VBoxSF::vboxCallSymlink: " 742 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 743 */ 744 if (RT_SUCCESS (rc)) 745 { 746 rc = data.callInfo.result; 747 } 748 return rc; 749 } 750 751 DECLVBGL(int) vboxCallSetSymlinks (PVBSFCLIENT pClient) 752 { 753 int rc = VINF_SUCCESS; 754 755 VBoxGuestHGCMCallInfo callInfo; 756 757 VBOX_INIT_CALL (&callInfo, SET_SYMLINKS, pClient); 758 rc = VbglHGCMCall (pClient->handle, &callInfo, sizeof (callInfo)); 759 if (RT_SUCCESS (rc)) 760 { 761 rc = callInfo.result; 762 } 763 return rc; 764 } 765 766 683 767 #endif /* !VBGL_VBOXGUEST */ -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.h
r31002 r33439 179 179 DECLVBGL(int) vboxCallSetUtf8 (PVBSFCLIENT pClient); 180 180 181 DECLVBGL(int) vboxReadLink (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING ParsedPath, uint32_t pcbBuffer, uint8_t *pBuffer); 182 DECLVBGL(int) vboxCallSymlink (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING pNewPath, PSHFLSTRING pOldPath, PRTFSOBJINFO pBuffer); 183 DECLVBGL(int) vboxCallSetSymlinks (PVBSFCLIENT pClient); 184 181 185 #endif /* __VBOXCALLS__H */
Note:
See TracChangeset
for help on using the changeset viewer.