Changeset 40798 in vbox
- Timestamp:
- Apr 6, 2012 4:44:13 PM (13 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r40796 r40798 386 386 { "RTCrc32Process", (void *)RTCrc32Process }, 387 387 { "RTCrc32Start", (void *)RTCrc32Start }, 388 { "RTUuidCompare", (void *)RTUuidCompare }, 389 { "RTUuidCompareStr", (void *)RTUuidCompareStr }, 390 { "RTUuidFromStr", (void *)RTUuidFromStr }, 391 { "RTStrDupTag", (void *)RTStrDupTag }, 392 { "RTStrFree", (void *)RTStrFree }, 393 { "RTStrCopy", (void *)RTStrCopy }, 394 { "RTStrNCmp", (void *)RTStrNCmp }, 395 388 396 /* SED: END */ 389 397 }; … … 398 406 /* VBoxNetFlt */ 399 407 (PFNRT)RTErrConvertFromErrno, 400 (PFNRT)RTUuidCompare,401 (PFNRT)RTUuidCompareStr,402 (PFNRT)RTUuidFromStr,403 (PFNRT)RTStrDupTag,404 (PFNRT)RTStrFree,405 (PFNRT)RTStrCopy,406 (PFNRT)RTStrNCmp,407 408 /* VBoxNetAdp */ 408 409 (PFNRT)RTRandBytes, -
trunk/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp
r40784 r40798 872 872 */ 873 873 #if defined(__GNUC__) && (defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX)) 874 __asm__ __volatile__("\874 __asm__("\ 875 875 .section .text \n\ 876 876 \n\ … … 880 880 "); 881 881 # if defined(RT_ARCH_AMD64) 882 __asm__ __volatile__(" \882 __asm__(" \ 883 883 movq g_pfnSupdrvProbeFireKernel(%rip), %rax \n\ 884 884 jmp *%rax \n\ 885 885 "); 886 886 # elif defined(RT_ARCH_X86) 887 __asm__ __volatile__("\887 __asm__("\ 888 888 movl g_pfnSupdrvProbeFireKernel, %eax \n\ 889 889 jmp *%eax \n\ … … 892 892 # error "Which arch is this?" 893 893 #endif 894 __asm__ __volatile__("\894 __asm__("\ 895 895 \n\ 896 896 .type supdrvTracerProbeFireStub,@function \n\ -
trunk/src/VBox/HostDrivers/Support/linux/Makefile
r40777 r40798 121 121 common/misc/handletablectx.o \ 122 122 common/misc/thread.o \ 123 common/string/RTStrCopy.o \ 123 124 common/string/RTStrCopyP.o \ 125 common/string/RTStrNCmp.o \ 126 common/string/RTStrNLen.o \ 127 common/string/stringalloc.o \ 124 128 common/string/strformat.o \ 125 129 common/string/strformatrt.o \ -
trunk/src/VBox/HostDrivers/Support/linux/files_vboxdrv
r40777 r40798 6 6 7 7 # 8 # Copyright (C) 2007-201 0Oracle Corporation8 # Copyright (C) 2007-2012 Oracle Corporation 9 9 # 10 10 # This file is part of VirtualBox Open Source Edition (OSE), as … … 53 53 ${PATH_ROOT}/include/iprt/power.h=>include/iprt/power.h \ 54 54 ${PATH_ROOT}/include/iprt/process.h=>include/iprt/process.h \ 55 ${PATH_ROOT}/include/iprt/rand.h=>include/iprt/rand.h \ 55 56 ${PATH_ROOT}/include/iprt/semaphore.h=>include/iprt/semaphore.h \ 56 57 ${PATH_ROOT}/include/iprt/spinlock.h=>include/iprt/spinlock.h \ … … 115 116 ${PATH_ROOT}/src/VBox/Runtime/common/misc/thread.cpp=>common/misc/thread.c \ 116 117 ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrCopyP.cpp=>common/string/RTStrCopyP.c \ 118 ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrCopy.cpp=>common/string/RTStrCopy.c \ 119 ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrNCmp.cpp=>common/string/RTStrNCmp.c \ 120 ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrNLen.cpp=>common/string/RTStrNLen.c \ 121 ${PATH_ROOT}/src/VBox/Runtime/common/string/stringalloc.cpp=>common/string/stringalloc.c \ 117 122 ${PATH_ROOT}/src/VBox/Runtime/common/string/strformat.cpp=>common/string/strformat.c \ 118 123 ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatrt.cpp=>common/string/strformatrt.c \ -
trunk/src/VBox/Runtime/common/rand/rand.cpp
r33540 r40798 61 61 static DECLCALLBACK(int) rtRandInitOnce(void *pvUser1, void *pvUser2) 62 62 { 63 NOREF(pvUser1);64 NOREF(pvUser2);65 66 63 RTRAND hRand; 67 64 int rc = RTRandAdvCreateSystemFaster(&hRand); … … 80 77 AssertRC(rc); 81 78 79 NOREF(pvUser1); 80 NOREF(pvUser2); 82 81 return rc; 83 82 } -
trunk/src/VBox/Runtime/common/string/stringalloc.cpp
r34032 r40798 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 62 62 return VERR_NO_STR_MEMORY; 63 63 } 64 RT_EXPORT_SYMBOL(RTStrAlloc Tag);64 RT_EXPORT_SYMBOL(RTStrAllocExTag); 65 65 66 66 … … 104 104 RTDECL(char *) RTStrDupTag(const char *pszString, const char *pszTag) 105 105 { 106 #if defined(__cplusplus) 106 107 AssertPtr(pszString); 108 #endif 107 109 size_t cch = strlen(pszString) + 1; 108 110 char *psz = (char *)RTMemAllocTag(cch, pszTag); … … 116 118 RTDECL(int) RTStrDupExTag(char **ppszString, const char *pszString, const char *pszTag) 117 119 { 120 #if defined(__cplusplus) 118 121 AssertPtr(ppszString); 119 122 AssertPtr(pszString); 123 #endif 120 124 121 125 size_t cch = strlen(pszString) + 1; … … 134 138 RTDECL(char *) RTStrDupNTag(const char *pszString, size_t cchMax, const char *pszTag) 135 139 { 140 #if defined(__cplusplus) 136 141 AssertPtr(pszString); 142 #endif 137 143 char const *pszEnd = RTStrEnd(pszString, cchMax); 138 144 size_t cch = pszEnd ? (uintptr_t)pszEnd - (uintptr_t)pszString : cchMax; … … 158 164 RTDECL(int) RTStrAAppendNTag(char **ppsz, const char *pszAppend, size_t cchAppend, const char *pszTag) 159 165 { 166 size_t cchOrg; 167 char *pszNew; 168 160 169 if (!cchAppend) 161 170 return VINF_SUCCESS; … … 165 174 Assert(cchAppend == RTStrNLen(pszAppend, cchAppend)); 166 175 167 size_t constcchOrg = *ppsz ? strlen(*ppsz) : 0;168 char *pszNew = (char *)RTMemReallocTag(*ppsz, cchOrg + cchAppend + 1, pszTag);176 cchOrg = *ppsz ? strlen(*ppsz) : 0; 177 pszNew = (char *)RTMemReallocTag(*ppsz, cchOrg + cchAppend + 1, pszTag); 169 178 if (!pszNew) 170 179 return VERR_NO_STR_MEMORY; … … 247 256 RTDECL(int) RTStrATruncateTag(char **ppsz, size_t cchNew, const char *pszTag) 248 257 { 258 char *pszNew; 249 259 char *pszOld = *ppsz; 250 260 if (!cchNew) … … 253 263 { 254 264 *pszOld = '\0'; 255 char *pszNew = (char *)RTMemReallocTag(pszOld, 1, pszTag);265 pszNew = (char *)RTMemReallocTag(pszOld, 1, pszTag); 256 266 if (pszNew) 257 267 *ppsz = pszNew; … … 260 270 else 261 271 { 272 char *pszZero; 262 273 AssertPtrReturn(pszOld, VERR_OUT_OF_RANGE); 263 274 AssertReturn(cchNew < ~(size_t)64, VERR_OUT_OF_RANGE); 264 char *pszZero = RTStrEnd(pszOld, cchNew + 63);275 pszZero = RTStrEnd(pszOld, cchNew + 63); 265 276 AssertReturn(!pszZero || (size_t)(pszZero - pszOld) >= cchNew, VERR_OUT_OF_RANGE); 266 277 pszOld[cchNew] = '\0'; 267 278 if (!pszZero) 268 279 { 269 char *pszNew = (char *)RTMemReallocTag(pszOld, cchNew + 1, pszTag);280 pszNew = (char *)RTMemReallocTag(pszOld, cchNew + 1, pszTag); 270 281 if (pszNew) 271 282 *ppsz = pszNew;
Note:
See TracChangeset
for help on using the changeset viewer.