Changeset 77854 in vbox for trunk/include
- Timestamp:
- Mar 22, 2019 10:23:36 PM (6 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuestLibSharedFoldersInline.h
r77853 r77854 104 104 } 105 105 106 107 106 /** 108 107 * SHFL_FN_QUERY_FEATURES request, simplified version. … … 125 124 } 126 125 126 127 /** Request structure for VbglR0SfHostReqSetUtf8 and VbglR0SfHostReqSetSymlink. */ 128 typedef struct VBOXSFNOPARMS 129 { 130 VBGLIOCIDCHGCMFASTCALL Hdr; 131 VMMDevHGCMCall Call; 132 /* no parameters */ 133 } VBOXSFNOPARMS; 134 135 /** 136 * Worker for request without any parameters. 137 */ 138 DECLINLINE(int) VbglR0SfHostReqNoParms(VBOXSFNOPARMS *pReq, uint32_t uFunction, uint32_t cParms) 139 { 140 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, 141 uFunction, cParms, sizeof(*pReq)); 142 int vrc = VbglR0HGCMFastCall(g_SfClient.handle, &pReq->Hdr, sizeof(*pReq)); 143 if (RT_SUCCESS(vrc)) 144 vrc = pReq->Call.header.result; 145 return vrc; 146 } 147 148 /** 149 * Worker for request without any parameters, simplified. 150 */ 151 DECLINLINE(int) VbglR0SfHostReqNoParmsSimple(uint32_t uFunction, uint32_t cParms) 152 { 153 VBOXSFNOPARMS *pReq = (VBOXSFNOPARMS *)VbglR0PhysHeapAlloc(sizeof(*pReq)); 154 if (pReq) 155 { 156 int vrc = VbglR0SfHostReqNoParms(pReq, uFunction, cParms); 157 VbglR0PhysHeapFree(pReq); 158 return vrc; 159 } 160 return VERR_NO_MEMORY; 161 } 162 163 164 /** 165 * SHFL_F_SET_UTF8 request. 166 */ 167 DECLINLINE(int) VbglR0SfHostReqSetUtf8(VBOXSFNOPARMS *pReq) 168 { 169 return VbglR0SfHostReqNoParms(pReq, SHFL_FN_SET_UTF8, SHFL_CPARMS_SET_UTF8); 170 } 171 172 /** 173 * SHFL_F_SET_UTF8 request, simplified version. 174 */ 175 DECLINLINE(int) VbglR0SfHostReqSetUtf8Simple(void) 176 { 177 return VbglR0SfHostReqNoParmsSimple(SHFL_FN_SET_UTF8, SHFL_CPARMS_SET_UTF8); 178 } 179 180 181 /** 182 * SHFL_F_SET_SYMLINKS request. 183 */ 184 DECLINLINE(int) VbglR0SfHostReqSetSymlinks(VBOXSFNOPARMS *pReq) 185 { 186 return VbglR0SfHostReqNoParms(pReq, SHFL_FN_SET_SYMLINKS, SHFL_CPARMS_SET_SYMLINKS); 187 } 188 189 /** 190 * SHFL_F_SET_SYMLINKS request, simplified version. 191 */ 192 DECLINLINE(int) VbglR0SfHostReqSetSymlinksSimple(void) 193 { 194 return VbglR0SfHostReqNoParmsSimple(SHFL_FN_SET_SYMLINKS, SHFL_CPARMS_SET_SYMLINKS); 195 } 127 196 128 197 -
trunk/include/VBox/shflsvc.h
r77848 r77854 1511 1511 1512 1512 1513 /** @name SHFL_FN_SET_UTF8 1514 * @{ */ 1515 /** NUmber of parameters for SHFL_FN_SET_UTF8. */ 1516 #define SHFL_CPARMS_SET_UTF8 (0) 1517 /** @} */ 1518 1519 1513 1520 /** @name SHFL_FN_LIST 1514 1521 * @remarks Listing information includes variable length RTDIRENTRY[EX] … … 1842 1849 1843 1850 1851 /** @name SHFL_FN_SET_SYMLINKS 1852 * @{ */ 1853 /** NUmber of parameters for SHFL_FN_SET_SYMLINKS. */ 1854 #define SHFL_CPARMS_SET_SYMLINKS (0) 1855 /** @} */ 1856 1857 1844 1858 /** @name SHFL_FN_QUERY_MAP_INFO 1845 1859 * @{
Note:
See TracChangeset
for help on using the changeset viewer.