Changeset 78561 in vbox for trunk/src/VBox/Runtime/r3/posix
- Timestamp:
- May 17, 2019 11:15:02 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/shmem-posix.cpp
r76553 r78561 214 214 215 215 216 RTDECL(int) RTShMemDelete(const char *pszName) 217 { 218 AssertPtrReturn(pszName, VERR_INVALID_POINTER); 219 220 size_t cchName = strlen(pszName); 221 AssertReturn(cchName, VERR_INVALID_PARAMETER); 222 AssertReturn(cchName < NAME_MAX - 1, VERR_INVALID_PARAMETER); /* account for the / we add later on. */ 223 char *psz = NULL; 224 225 int rc = RTStrAllocEx(&psz, cchName + 2); /* '/' + terminator */ 226 if (RT_SUCCESS(rc)) 227 { 228 psz[0] = '/'; 229 memcpy(&psz[1], pszName, cchName + 1); 230 if (shm_unlink(psz)) 231 rc = RTErrConvertFromErrno(errno); 232 RTStrFree(psz); 233 } 234 235 return rc; 236 } 237 238 216 239 RTDECL(uint32_t) RTShMemRefCount(RTSHMEM hShMem) 217 240 {
Note:
See TracChangeset
for help on using the changeset viewer.