Changeset 103275 in vbox
- Timestamp:
- Feb 8, 2024 11:56:18 AM (14 months ago)
- svn:sync-xref-src-repo-rev:
- 161567
- Location:
- trunk/src
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGPlugInDarwin.cpp
r103260 r103275 716 716 { 717 717 char szTmp[RTDBG_SEGMENT_NAME_LENGTH + sizeof("_start")]; 718 rc = RTStrCat(RTStrCopy2(szTmp, sizeof(szTmp), aSegs[iSeg].szName), sizeof(szTmp), "_start"); 719 if (RT_SUCCESS(rc)) 720 rc = RTDbgModSymbolAdd(hMod, szTmp, iSeg, 0 /*uRva*/, 0 /*cb*/, 0 /*fFlags*/, NULL); 718 strcat(strcpy(szTmp, aSegs[iSeg].szName), "_start"); 719 rc = RTDbgModSymbolAdd(hMod, szTmp, iSeg, 0 /*uRva*/, 0 /*cb*/, 0 /*fFlags*/, NULL); 721 720 } 722 721 uRvaNext += aSegs[iSeg].cb; -
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r103260 r103275 4842 4842 #define QUERY_VAL_RET(a_Width, a_szName, a_pValue, a_uDefault, a_ExprValid, a_szValidRange) \ 4843 4843 do { \ 4844 rc = RTStrCopy(szNm, sizeof(szNm), a_szName); \ 4845 AssertRCReturn(rc, PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, \ 4846 N_("Configuration error: Name '%s' too long [1]"), szNm)); \ 4847 rc = RT_CONCAT(pHlp->pfnCFGMQueryU,a_Width)(pDirNode, szNm, a_pValue); \ 4844 rc = RT_CONCAT(pHlp->pfnCFGMQueryU,a_Width)(pDirNode, strcpy(szNm, a_szName), a_pValue); \ 4848 4845 if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT) \ 4849 4846 { \ 4850 rc = RTStrCat(szNm, sizeof(szNm), pszDir); \ 4851 AssertRCReturn(rc, PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, \ 4852 N_("Configuration error: Name '%s' too long [2]"), pszDir)); \ 4853 rc = RT_CONCAT(pHlp->pfnCFGMQueryU,a_Width)(pCfg, szNm, a_pValue); \ 4847 rc = RT_CONCAT(pHlp->pfnCFGMQueryU,a_Width)(pCfg, strcat(szNm, pszDir), a_pValue); \ 4854 4848 if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT) \ 4855 4849 { \ -
trunk/src/VBox/Devices/Network/testcase/tstIntNet-1.cpp
r103260 r103275 847 847 } 848 848 849 rc = RTStrCat(szPath, sizeof(szPath), "/../VMMR0.r0"); 850 if (RT_FAILURE(rc)) 851 { 852 RTPrintf("tstIntNet-1: RTStrCat -> %Rrc\n", rc); 853 return 1; 854 } 849 strcat(szPath, "/../VMMR0.r0"); 855 850 856 851 char szAbsPath[RTPATH_MAX]; -
trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp
r103260 r103275 62 62 int rcRet = 0; 63 63 int i; 64 int rc; 64 65 int cIterations = argc > 1 ? RTStrToUInt32(argv[1]) : 32; 65 66 if (cIterations == 0) … … 71 72 RTR3InitExe(argc, &argv, 0); 72 73 PSUPDRVSESSION pSession; 73 intrc = SUPR3Init(&pSession);74 rc = SUPR3Init(&pSession); 74 75 rcRet += rc != 0; 75 76 RTPrintf("tstInt: SUPR3Init -> rc=%Rrc\n", rc); 76 77 char szFile[RTPATH_MAX]; 77 if (RT_SUCCESS(rc)) 78 rc = RTPathExecDir(szFile, sizeof(szFile)); 79 78 if (!rc) 79 { 80 rc = RTPathExecDir(szFile, sizeof(szFile) - sizeof("/VMMR0.r0")); 81 } 80 82 char szAbsFile[RTPATH_MAX]; 81 83 if (RT_SUCCESS(rc)) 82 84 { 83 rc = RTPathAppend(szFile, sizeof(szFile), "VMMR0.r0"); 84 if (RT_SUCCESS(rc)) 85 rc = RTPathAbs(szFile, szAbsFile, sizeof(szAbsFile)); 85 strcat(szFile, "/VMMR0.r0"); 86 rc = RTPathAbs(szFile, szAbsFile, sizeof(szAbsFile)); 86 87 } 87 88 if (RT_SUCCESS(rc)) … … 235 236 } 236 237 237 if (RT_FAILURE(rc))238 RTPrintf("Failed with rc=%Rrc\n", rc);239 240 238 return !!rc; 241 239 } -
trunk/src/VBox/HostServices/SharedFolders/testcase/tstShflCase.cpp
r103260 r103275 1 1 /** @file 2 2 * Testcase for shared folder case conversion code. 3 *4 * @todo r=andy Testcase needs to be rewritten using the test framework.5 * Otherwise it's almost pointless to run this on the testboxes.6 3 */ 7 4 … … 45 42 #include <iprt/path.h> 46 43 #include <iprt/string.h> 47 #include <iprt/test.h>48 44 #include <iprt/uni.h> 49 45 #include <stdio.h> … … 209 205 } 210 206 211 static int vbsfCorrectCasing(char *pszFullPath, char *pszStartComponent , size_t cbStartComponent)207 static int vbsfCorrectCasing(char *pszFullPath, char *pszStartComponent) 212 208 { 213 209 PRTDIRENTRYEX pDirEntry = NULL; … … 234 230 Assert(*(pszStartComponent-1) == RTPATH_DELIMITER); 235 231 *(pszStartComponent-1) = 0; 236 rc = RTStrCopy(pDirEntry->szName, sizeof(pDirEntry->szName), pszFullPath); 237 if (RT_FAILURE(rc)) 238 goto end; 232 strcpy(pDirEntry->szName, pszFullPath); 239 233 szWildCard[0] = RTPATH_DELIMITER; 240 234 szWildCard[1] = '*'; 241 235 szWildCard[2] = 0; 242 rc = RTStrCat(pDirEntry->szName, sizeof(pDirEntry->szName), szWildCard); 243 if (RT_FAILURE(rc)) 244 goto end; 236 strcat(pDirEntry->szName, szWildCard); 237 245 238 rc = RTDirOpenFiltered(&hSearch, pDirEntry->szName, RTDIRFILTER_WINNT, 0 /*fFlags*/); 246 239 *(pszStartComponent-1) = RTPATH_DELIMITER; … … 270 263 { 271 264 Log(("Found original name %s (%s)\n", &pDirEntry->szName[0], pszStartComponent)); 272 rc = RTStrCopy(pszStartComponent, cbStartComponent, &pDirEntry->szName[0]); 265 strcpy(pszStartComponent, &pDirEntry->szName[0]); 266 rc = VINF_SUCCESS; 273 267 break; 274 268 } … … 288 282 289 283 290 static int testCase(char *pszFullPath, size_t cbFullPath,bool fWildCard = false)284 static int testCase(char *pszFullPath, bool fWildCard = false) 291 285 { 292 286 int rc; … … 297 291 { 298 292 /* strip off the last path component, that contains the wildcard(s) */ 299 size_t cchLlen = strlen(pszFullPath);300 char *pszSrc = pszFullPath + cchLlen - 1;301 302 while( pszSrc > pszFullPath)303 { 304 if (* pszSrc == RTPATH_DELIMITER)293 size_t len = strlen(pszFullPath); 294 char *src = pszFullPath + len - 1; 295 296 while(src > pszFullPath) 297 { 298 if (*src == RTPATH_DELIMITER) 305 299 break; 306 pszSrc--;307 } 308 if (* pszSrc == RTPATH_DELIMITER)300 src--; 301 } 302 if (*src == RTPATH_DELIMITER) 309 303 { 310 304 bool fHaveWildcards = false; 311 char *temp = pszSrc;305 char *temp = src; 312 306 313 307 while(*temp) … … 325 319 if (fHaveWildcards) 326 320 { 327 pszWildCardComponent = pszSrc;321 pszWildCardComponent = src; 328 322 *pszWildCardComponent = 0; 329 323 } … … 334 328 if (rc == VERR_FILE_NOT_FOUND || rc == VERR_PATH_NOT_FOUND) 335 329 { 336 size_t cchLen = strlen(pszFullPath);337 char *pszSrc = pszFullPath + cchLen - 1;330 size_t len = strlen(pszFullPath); 331 char *src = pszFullPath + len - 1; 338 332 339 333 Log(("Handle case insensitive guest fs on top of host case sensitive fs for %s\n", pszFullPath)); 340 334 341 335 /* Find partial path that's valid */ 342 while( pszSrc > pszFullPath)343 { 344 if (* pszSrc == RTPATH_DELIMITER)336 while(src > pszFullPath) 337 { 338 if (*src == RTPATH_DELIMITER) 345 339 { 346 * pszSrc = 0;340 *src = 0; 347 341 rc = RTPathQueryInfo (pszFullPath, &info, RTFSOBJATTRADD_NOTHING); 348 * pszSrc = RTPATH_DELIMITER;342 *src = RTPATH_DELIMITER; 349 343 if (rc == VINF_SUCCESS) 350 344 { 351 345 #ifdef DEBUG 352 * pszSrc = 0;346 *src = 0; 353 347 Log(("Found valid partial path %s\n", pszFullPath)); 354 * pszSrc = RTPATH_DELIMITER;348 *src = RTPATH_DELIMITER; 355 349 #endif 356 350 break; … … 358 352 } 359 353 360 pszSrc--;361 } 362 Assert(* pszSrc == RTPATH_DELIMITER && RT_SUCCESS(rc));363 if ( * pszSrc == RTPATH_DELIMITER354 src--; 355 } 356 Assert(*src == RTPATH_DELIMITER && RT_SUCCESS(rc)); 357 if ( *src == RTPATH_DELIMITER 364 358 && RT_SUCCESS(rc)) 365 359 { 366 pszSrc++;360 src++; 367 361 for(;;) 368 362 { 369 char *end = pszSrc;363 char *end = src; 370 364 bool fEndOfString = true; 371 365 … … 381 375 fEndOfString = false; 382 376 *end = 0; 383 rc = RTPathQueryInfo( pszSrc, &info, RTFSOBJATTRADD_NOTHING);377 rc = RTPathQueryInfo(src, &info, RTFSOBJATTRADD_NOTHING); 384 378 Assert(rc == VINF_SUCCESS || rc == VERR_FILE_NOT_FOUND || rc == VERR_PATH_NOT_FOUND); 385 379 } 386 380 else 387 if (end == pszSrc)381 if (end == src) 388 382 rc = VINF_SUCCESS; /* trailing delimiter */ 389 383 else … … 393 387 { 394 388 /* path component is invalid; try to correct the casing */ 395 rc = vbsfCorrectCasing(pszFullPath, pszSrc, cbFullPath - (pszFullPath - pszSrc));389 rc = vbsfCorrectCasing(pszFullPath, src); 396 390 if (RT_FAILURE(rc)) 397 391 { … … 406 400 407 401 *end = RTPATH_DELIMITER; 408 pszSrc = end + 1;402 src = end + 1; 409 403 } 410 404 if (RT_FAILURE(rc)) … … 436 430 RTLogFlags(NULL, "unbuffered"); 437 431 438 RTTESTI_CHECK_RC_OK(RTStrCopy(szTest, sizeof(szTest), "c:\\test Dir\\z.bAt"));439 testCase(szTest , sizeof(szTest));440 RTTESTI_CHECK_RC_OK(RTStrCopy(szTest, sizeof(szTest), "c:\\test dir\\z.bAt"));441 testCase(szTest , sizeof(szTest));442 RTTESTI_CHECK_RC_OK(RTStrCopy(szTest, sizeof(szTest), "c:\\test dir\\SUBDIR\\z.bAt"));443 testCase(szTest , sizeof(szTest));444 RTTESTI_CHECK_RC_OK(RTStrCopy(szTest, sizeof(szTest), "c:\\test dir\\SUBDiR\\atestje.bat"));445 testCase(szTest , sizeof(szTest));446 RTTESTI_CHECK_RC_OK(RTStrCopy(szTest, sizeof(szTest), "c:\\TEST dir\\subDiR\\aTestje.baT"));447 testCase(szTest , sizeof(szTest));448 RTTESTI_CHECK_RC_OK(RTStrCopy(szTest, sizeof(szTest), "c:\\TEST dir\\subDiR\\*"));449 testCase(szTest, sizeof(szTest),true);450 RTTESTI_CHECK_RC_OK(RTStrCopy(szTest, sizeof(szTest), "c:\\TEST dir\\subDiR\\"));451 testCase(szTest , sizeof(szTest),true);452 RTTESTI_CHECK_RC_OK(RTStrCopy(szTest, sizeof(szTest), "c:\\test dir\\SUBDIR\\"));453 testCase(szTest , sizeof(szTest));454 RTTESTI_CHECK_RC_OK(RTStrCopy(szTest, sizeof(szTest), "c:\\test dir\\invalid\\SUBDIR\\test.bat"));455 testCase(szTest , sizeof(szTest));432 strcpy(szTest, "c:\\test Dir\\z.bAt"); 433 testCase(szTest); 434 strcpy(szTest, "c:\\test dir\\z.bAt"); 435 testCase(szTest); 436 strcpy(szTest, "c:\\test dir\\SUBDIR\\z.bAt"); 437 testCase(szTest); 438 strcpy(szTest, "c:\\test dir\\SUBDiR\\atestje.bat"); 439 testCase(szTest); 440 strcpy(szTest, "c:\\TEST dir\\subDiR\\aTestje.baT"); 441 testCase(szTest); 442 strcpy(szTest, "c:\\TEST dir\\subDiR\\*"); 443 testCase(szTest, true); 444 strcpy(szTest, "c:\\TEST dir\\subDiR\\"); 445 testCase(szTest ,true); 446 strcpy(szTest, "c:\\test dir\\SUBDIR\\"); 447 testCase(szTest); 448 strcpy(szTest, "c:\\test dir\\invalid\\SUBDIR\\test.bat"); 449 testCase(szTest); 456 450 return 0; 457 451 } -
trunk/src/VBox/Main/src-server/linux/PerformanceLinux.cpp
r103260 r103275 531 531 return; 532 532 } 533 vrc = RTStrCat(szVolInfo, sizeof(szVolInfo), "/" VBOXVOLINFO_NAME " "); 534 AssertRCReturnVoid(vrc); 535 vrc = RTStrCat(szVolInfo, sizeof(szVolInfo), pcszVolume); 536 AssertRCReturnVoid(vrc); 533 strcat(szVolInfo, "/" VBOXVOLINFO_NAME " "); 534 strcat(szVolInfo, pcszVolume); 537 535 538 536 FILE *fp = popen(szVolInfo, "r"); -
trunk/src/VBox/Main/src-server/xpcom/server_module.cpp
r103260 r103275 75 75 76 76 /** Name of the server executable. */ 77 const char g_szVBoxSVC_exe[] = RTPATH_SLASH_STR "VBoxSVC" HOSTSUFF_EXE;77 const char VBoxSVC_exe[] = RTPATH_SLASH_STR "VBoxSVC" HOSTSUFF_EXE; 78 78 79 79 enum … … 88 88 * Full path to the VBoxSVC executable. 89 89 */ 90 static char g_szVBoxSVCPath[RTPATH_MAX];91 static bool g_fIsVBoxSVCPathSet = false;90 static char VBoxSVCPath[RTPATH_MAX]; 91 static bool IsVBoxSVCPathSet = false; 92 92 93 93 /* … … 116 116 const char *apszArgs[] = 117 117 { 118 g_szVBoxSVCPath,118 VBoxSVCPath, 119 119 "--auto-shutdown", 120 120 "--inherit-startup-pipe", … … 132 132 hStdNil.u.hFile = NIL_RTFILE; 133 133 134 vrc = RTProcCreateEx( g_szVBoxSVCPath, apszArgs, RTENV_DEFAULT,134 vrc = RTProcCreateEx(VBoxSVCPath, apszArgs, RTENV_DEFAULT, 135 135 RTPROC_FLAGS_DETACHED, &hStdNil, &hStdNil, &hStdNil, 136 136 NULL /* pszAsUser */, NULL /* pszPassword */, NULL /* pExtraData */, … … 187 187 } 188 188 189 if (! g_fIsVBoxSVCPathSet)189 if (!IsVBoxSVCPathSet) 190 190 { 191 191 /* Get the directory containing XPCOM components -- the VBoxSVC … … 204 204 205 205 LogFlowFunc(("component directory = \"%s\"\n", path.get())); 206 AssertBreakStmt(path.Length() + strlen( g_szVBoxSVC_exe) < RTPATH_MAX,206 AssertBreakStmt(path.Length() + strlen(VBoxSVC_exe) < RTPATH_MAX, 207 207 rc = NS_ERROR_FAILURE); 208 208 … … 212 212 if (cbKernArch > 0) 213 213 { 214 sprintf( g_szVBoxSVCPath, "/opt/VirtualBox/%s%s", achKernArch, g_szVBoxSVC_exe);215 g_fIsVBoxSVCPathSet = true;214 sprintf(VBoxSVCPath, "/opt/VirtualBox/%s%s", achKernArch, VBoxSVC_exe); 215 IsVBoxSVCPathSet = true; 216 216 } 217 217 else 218 218 rc = NS_ERROR_UNEXPECTED; 219 219 #else 220 int vrc = RTStrCopy(g_szVBoxSVCPath, sizeof(g_szVBoxSVCPath), path.get()); 221 AssertRCBreakStmt(vrc, rc = NS_ERROR_FAILURE); 222 RTPathStripFilename(g_szVBoxSVCPath); 223 vrc = RTStrCat(g_szVBoxSVCPath, sizeof(g_szVBoxSVCPath), g_szVBoxSVC_exe); 224 AssertRCBreakStmt(vrc, rc = NS_ERROR_FAILURE); 225 226 g_fIsVBoxSVCPathSet = true; 220 strcpy(VBoxSVCPath, path.get()); 221 RTPathStripFilename(VBoxSVCPath); 222 strcat(VBoxSVCPath, VBoxSVC_exe); 223 224 IsVBoxSVCPathSet = true; 227 225 #endif 228 226 } … … 249 247 if (NS_FAILED(rc)) 250 248 { 251 LogFlowFunc(("Starting server \"%s\"...\n", g_szVBoxSVCPath));249 LogFlowFunc(("Starting server \"%s\"...\n", VBoxSVCPath)); 252 250 253 251 startedOnce = true; -
trunk/src/VBox/Runtime/common/dbg/dbgmod.cpp
r103260 r103275 610 610 if (pszName) 611 611 { 612 size_t const cchName = strlen(pszName); 613 size_t const cchExtFileBuf = cchName + strlen(pszExt) + 1; 614 615 char *pszExtFileBuf = (char *)alloca(cchExtFileBuf); 616 AssertPtrReturn(pszExtFileBuf, VERR_NO_MEMORY); 617 618 memcpy(pszExtFileBuf, pszName, cchName + 1); 619 RTPathStripSuffix(pszExtFileBuf); 620 int rc2 = RTStrCat(pszExtFileBuf, cchExtFileBuf, pszExt); 621 AssertRCReturn(rc2, rc2); 622 623 pszExtFile = pszExtFileBuf; 612 size_t cchName = strlen(pszName); 613 char *pszExtFileBuf = (char *)alloca(cchName + strlen(pszExt) + 1); 614 if (pszExtFileBuf) 615 { 616 memcpy(pszExtFileBuf, pszName, cchName + 1); 617 RTPathStripSuffix(pszExtFileBuf); 618 pszExtFile = strcat(pszExtFileBuf, pszExt); 619 } 624 620 } 625 621 } -
trunk/src/VBox/Runtime/r3/xml.cpp
r103260 r103275 2310 2310 if (RT_FAILURE(rc)) 2311 2311 throw EIPRTFailure(rc, "RTStrCopy"); 2312 rc = RTStrCat(szTmpFilename, sizeof(szTmpFilename), s_pszTmpSuff); 2313 if (RT_FAILURE(rc)) 2314 throw EIPRTFailure(rc, "RTStrCat"); 2312 strcat(szTmpFilename, s_pszTmpSuff); 2315 2313 2316 2314 char szPrevFilename[RTPATH_MAX]; -
trunk/src/VBox/Runtime/testcase/tstRTR0CommonDriver.h
r103260 r103275 121 121 rc = RTPathAppend(szPath, RTPATH_MAX, pszTestServiceName); 122 122 if (RT_SUCCESS(rc)) 123 rc = RTStrCat(szPath, sizeof(szPath), ".r0");123 strcat(szPath, ".r0"); 124 124 if (RT_FAILURE(rc)) 125 125 { … … 129 129 130 130 char szSrvReqHandler[sizeof(g_szSrvName) + sizeof("SrvReqHandler")]; 131 rc = RTStrCopy(szSrvReqHandler, sizeof(szSrvReqHandler), pszTestServiceName); 132 if (RT_SUCCESS(rc)) 133 rc = RTStrCat(szSrvReqHandler, sizeof(szSrvReqHandler), "SrvReqHandler"); 134 if (RT_FAILURE(rc)) 135 { 136 RTTestFailed(g_hTest, "RTStrCat failed with rc=%Rrc\n", rc); 137 return RTTestSummaryAndDestroy(g_hTest); 138 } 139 131 strcpy(szSrvReqHandler, pszTestServiceName); 132 strcat(szSrvReqHandler, "SrvReqHandler"); 140 133 for (size_t off = 0; RT_C_IS_LOWER(szSrvReqHandler[off]); off++) 141 134 szSrvReqHandler[off] = RT_C_TO_UPPER(szSrvReqHandler[off]); -
trunk/src/VBox/VMM/VMMR3/DBGFR3PlugIn.cpp
r103260 r103275 280 280 int rc = RTPathAppend(pszModule, cchModule, DBGF_PLUG_IN_PREFIX); 281 281 AssertRCReturn(rc, VERR_TRY_AGAIN); 282 rc = RTStrCat(pszModule, cchModule, pPlugIn->szName); 283 AssertRCReturn(rc, VERR_TRY_AGAIN); 284 rc = RTStrCat(pszModule, cchModule, pszSuff); 285 AssertRCReturn(rc, VERR_TRY_AGAIN); 282 strcat(&pszModule[cchPath], pPlugIn->szName); 283 strcat(&pszModule[cchPath + sizeof(DBGF_PLUG_IN_PREFIX) - 1 + pPlugIn->cchName], pszSuff); 286 284 Assert(strlen(pszModule) < cchModule - 4); 287 285 … … 482 480 rc = RTPathAppend(szPath, sizeof(szPath) - cchSuff, DBGF_PLUG_IN_PREFIX "*"); 483 481 AssertRCReturnVoid(rc); 484 rc = RTStrCat(szPath, sizeof(szPath), pszSuff); 485 AssertRCReturnVoid(rc); 482 strcat(szPath, pszSuff); 486 483 487 484 RTDIR hDir; -
trunk/src/VBox/ValidationKit/utils/fs/FsPerf.cpp
r103260 r103275 2954 2954 { 2955 2955 char szRenamed[FSPERF_MAX_PATH]; 2956 RTTESTI_CHECK_RC_OK(RTStrCat(RTStrCopy2(szRenamed, sizeof(szRenamed), pszFile), sizeof(szRenamed), "-renamed"));2956 strcat(strcpy(szRenamed, pszFile), "-renamed"); 2957 2957 if (!(iIteration & 1)) 2958 2958 return RTPathRename(pszFile, szRenamed, 0); … … 2971 2971 2972 2972 /* Non-existing files. */ 2973 RTTESTI_CHECK_RC_OK(RTStrCopy(szPath, sizeof(szPath), InEmptyDir(RT_STR_TUPLE("other-no-such-file"))));2973 strcpy(szPath, InEmptyDir(RT_STR_TUPLE("other-no-such-file"))); 2974 2974 RTTESTI_CHECK_RC(RTPathRename(InEmptyDir(RT_STR_TUPLE("no-such-file")), szPath, 0), VERR_FILE_NOT_FOUND); 2975 2976 RTTESTI_CHECK_RC_OK(RTStrCopy(szPath, sizeof(szPath), InEmptyDir(RT_STR_TUPLE("no-such-dir" RTPATH_SLASH_STR "other-no-such-file")))); 2975 strcpy(szPath, InEmptyDir(RT_STR_TUPLE("no-such-dir" RTPATH_SLASH_STR "other-no-such-file"))); 2977 2976 RTTESTI_CHECK_RC(RTPathRename(InEmptyDir(RT_STR_TUPLE("no-such-dir" RTPATH_SLASH_STR "no-such-file")), szPath, 0), 2978 2977 FSPERF_VERR_PATH_NOT_FOUND); 2979 2980 RTTESTI_CHECK_RC_OK(RTStrCopy(szPath, sizeof(szPath), InEmptyDir(RT_STR_TUPLE("other-no-such-file")))); 2978 strcpy(szPath, InEmptyDir(RT_STR_TUPLE("other-no-such-file"))); 2981 2979 RTTESTI_CHECK_RC(RTPathRename(InDir(RT_STR_TUPLE("known-file" RTPATH_SLASH_STR "no-such-file")), szPath, 0), VERR_PATH_NOT_FOUND); 2982 2980 … … 2985 2983 RTFILE_O_CREATE_REPLACE | RTFILE_O_DENY_NONE | RTFILE_O_WRITE), VINF_SUCCESS); 2986 2984 RTTESTI_CHECK_RC(RTFileClose(hFile1), VINF_SUCCESS); 2987 RTTESTI_CHECK_RC_OK(RTStrCat(RTStrCopy2(szPath, sizeof(szPath), g_szDir), sizeof(szPath), "-no-such-dir" RTPATH_SLASH_STR "file16"));2985 strcat(strcpy(szPath, g_szDir), "-no-such-dir" RTPATH_SLASH_STR "file16"); 2988 2986 RTTESTI_CHECK_RC(RTPathRename(szPath, g_szDir, 0), FSPERF_VERR_PATH_NOT_FOUND); 2989 2987 RTTESTI_CHECK_RC(RTPathRename(g_szDir, szPath, 0), FSPERF_VERR_PATH_NOT_FOUND); 2990 2988 2991 2989 /* Shallow: */ 2992 RTTESTI_CHECK_RC_OK(RTStrCat(RTStrCopy2(szPath, sizeof(szPath), g_szDir), sizeof(szPath), "-other"));2990 strcat(strcpy(szPath, g_szDir), "-other"); 2993 2991 PROFILE_FN(RTPathRename(iIteration & 1 ? szPath : g_szDir, iIteration & 1 ? g_szDir : szPath, 0), g_nsTestRun, "RTPathRename"); 2994 2992 … … 2998 2996 RTTESTI_CHECK_RC(RTFileClose(hFile1), VINF_SUCCESS); 2999 2997 3000 RTTESTI_CHECK_RC_OK(RTStrCat(RTStrCopy2(szPath, sizeof(szPath), g_szDeepDir), sizeof(szPath), "-other"));2998 strcat(strcpy(szPath, g_szDeepDir), "-other"); 3001 2999 PROFILE_FN(RTPathRename(iIteration & 1 ? szPath : g_szDeepDir, iIteration & 1 ? g_szDeepDir : szPath, 0), 3002 3000 g_nsTestRun, "RTPathRename/deep"); -
trunk/src/VBox/ValidationKit/utils/misc/loadgenerator.cpp
r103260 r103275 98 98 if (RT_SUCCESS(rc)) 99 99 { 100 rc = RTStrCat(szPath, sizeof(szPath), "/loadgeneratorR0.r0"); 100 strcat(szPath, "/loadgeneratorR0.r0"); 101 void *pvImageBase; 102 rc = SUPR3LoadServiceModule(szPath, "loadgeneratorR0", "LoadGenR0ServiceReqHandler", &pvImageBase); 101 103 if (RT_SUCCESS(rc)) 102 104 { 103 void *pvImageBase; 104 rc = SUPR3LoadServiceModule(szPath, "loadgeneratorR0", "LoadGenR0ServiceReqHandler", &pvImageBase); 105 if (RT_SUCCESS(rc)) 106 { 107 /* done */ 108 } 109 else 110 RTMsgError("SUPR3LoadServiceModule(%s): %Rrc", szPath, rc); 105 /* done */ 111 106 } 112 107 else 113 RTMsgError(" RTStrCat(%s): %Rrc", szPath, rc);108 RTMsgError("SUPR3LoadServiceModule(%s): %Rrc", szPath, rc); 114 109 } 115 110 else -
trunk/src/bldprogs/VBoxTpG.cpp
r103260 r103275 2374 2374 if (RT_FAILURE(rc)) 2375 2375 return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathAbs failed: %Rrc", rc); 2376 rc = RTStrCat(g_szAssemblerIncVal, sizeof(g_szAssemblerIncVal), "/"); 2377 if (RT_FAILURE(rc)) 2378 return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTStrCat failed: %Rrc", rc); 2376 strcat(g_szAssemblerIncVal, "/"); 2379 2377 g_pszAssemblerIncVal = g_szAssemblerIncVal; 2380 2378
Note:
See TracChangeset
for help on using the changeset viewer.