Changeset 42721 in vbox for trunk/src/VBox/Main
- Timestamp:
- Aug 9, 2012 5:28:36 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 79930
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r42716 r42721 340 340 341 341 /* Create a new context ID and assign it. */ 342 int rc = VERR_NOT_FOUND;342 int vrc = VERR_NOT_FOUND; 343 343 344 344 ULONG uCount = mData.mNextContextID++; … … 360 360 * we can use this context ID for our new callback we want 361 361 * to add below. */ 362 rc = VINF_SUCCESS;362 vrc = VINF_SUCCESS; 363 363 break; 364 364 } … … 369 369 } 370 370 371 if (RT_SUCCESS( rc))371 if (RT_SUCCESS(vrc)) 372 372 { 373 373 /* Add callback with new context ID to our callback map. … … 386 386 } 387 387 388 return rc;388 return vrc; 389 389 } 390 390 … … 401 401 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 402 402 403 int rc;403 int vrc; 404 404 405 405 /* Get the optional callback associated to this context ID. … … 427 427 AssertReturn(CALLBACKDATAMAGIC_CLIENT_DISCONNECTED == pCallbackData->hdr.u32Magic, VERR_INVALID_PARAMETER); 428 428 429 rc = onGuestDisconnected(pCallback, pCallbackData); /* Affects all callbacks. */429 vrc = onGuestDisconnected(pCallback, pCallbackData); /* Affects all callbacks. */ 430 430 break; 431 431 } … … 438 438 AssertReturn(CALLBACKDATAMAGIC_EXEC_STATUS == pCallbackData->hdr.u32Magic, VERR_INVALID_PARAMETER); 439 439 440 rc = onProcessStatusChange(pCallback, pCallbackData);440 vrc = onProcessStatusChange(pCallback, pCallbackData); 441 441 break; 442 442 } … … 449 449 AssertReturn(CALLBACKDATAMAGIC_EXEC_OUT == pCallbackData->hdr.u32Magic, VERR_INVALID_PARAMETER); 450 450 451 rc = onProcessOutput(pCallback, pCallbackData);451 vrc = onProcessOutput(pCallback, pCallbackData); 452 452 break; 453 453 } … … 460 460 AssertReturn(CALLBACKDATAMAGIC_EXEC_IN_STATUS == pCallbackData->hdr.u32Magic, VERR_INVALID_PARAMETER); 461 461 462 rc = onProcessInputStatus(pCallback, pCallbackData);462 vrc = onProcessInputStatus(pCallback, pCallbackData); 463 463 break; 464 464 } … … 466 466 default: 467 467 /* Silently ignore not implemented functions. */ 468 rc = VERR_NOT_IMPLEMENTED;468 vrc = VERR_NOT_IMPLEMENTED; 469 469 break; 470 470 } 471 471 472 472 #ifdef DEBUG 473 LogFlowFuncLeaveRC( rc);473 LogFlowFuncLeaveRC(vrc); 474 474 #endif 475 return rc;475 return vrc; 476 476 } 477 477 … … 585 585 586 586 /* Signal in any case. */ 587 int rc = signalWaiters(waitRes);588 AssertRC( rc);589 590 LogFlowFuncLeaveRC( rc);591 return rc;587 int vrc = signalWaiters(waitRes); 588 AssertRC(vrc); 589 590 LogFlowFuncLeaveRC(vrc); 591 return vrc; 592 592 } 593 593 … … 600 600 mData.mPID, pData->u32Status, pData->u32Flags, pData->cbProcessed, pCallback, pData)); 601 601 602 int rc = checkPID(pData->u32PID);603 if (RT_FAILURE( rc))604 return rc;602 int vrc = checkPID(pData->u32PID); 603 if (RT_FAILURE(vrc)) 604 return vrc; 605 605 606 606 /* First, signal callback in every case (if available). */ 607 607 if (pCallback) 608 608 { 609 rc = pCallback->SetData(pData, sizeof(CALLBACKDATAEXECINSTATUS));609 vrc = pCallback->SetData(pData, sizeof(CALLBACKDATAEXECINSTATUS)); 610 610 611 611 int rc2 = pCallback->Signal(); 612 if (RT_SUCCESS( rc))613 rc = rc2;612 if (RT_SUCCESS(vrc)) 613 vrc = rc2; 614 614 } 615 615 … … 620 620 { 621 621 int rc2 = signalWaiters(ProcessWaitResult_StdIn); 622 if (RT_SUCCESS( rc))623 rc = rc2;624 } 625 626 LogFlowFuncLeaveRC( rc);627 return rc;622 if (RT_SUCCESS(vrc)) 623 vrc = rc2; 624 } 625 626 LogFlowFuncLeaveRC(vrc); 627 return vrc; 628 628 } 629 629 … … 644 644 pData->u32PID, pData->u32Status, pData->u32Flags, pCallback, pData)); 645 645 646 int rc = checkPID(pData->u32PID);647 if (RT_FAILURE( rc))648 return rc;646 int vrc = checkPID(pData->u32PID); 647 if (RT_FAILURE(vrc)) 648 return vrc; 649 649 650 650 BOOL fSignal = FALSE; … … 733 733 if (mData.mPID) 734 734 { 735 strError += Utf8StrFmt(tr("Error rc=%Rrc occured (PID %RU32)"),rc, mData.mPID);735 strError += Utf8StrFmt(tr("Error vrc=%Rrc occured (PID %RU32)"), vrc, mData.mPID); 736 736 } 737 737 else … … 782 782 } 783 783 784 rc = setErrorInternal(pData->u32Flags, strError);785 AssertRC( rc);784 vrc = setErrorInternal(pData->u32Flags, strError); 785 AssertRC(vrc); 786 786 break; 787 787 } … … 799 799 } 800 800 801 LogFlowThisFunc(("Got rc=%Rrc, waitResult=%d\n",rc, waitRes));801 LogFlowThisFunc(("Got vrc=%Rrc, waitResult=%d\n", vrc, waitRes)); 802 802 803 803 /* … … 805 805 */ 806 806 if (pCallback) 807 rc = pCallback->Signal();807 vrc = pCallback->Signal(); 808 808 809 809 if (fSignal) 810 810 { 811 811 int rc2 = signalWaiters(waitRes); 812 if (RT_SUCCESS( rc))813 rc = rc2;814 } 815 816 LogFlowFuncLeaveRC( rc);817 return rc;812 if (RT_SUCCESS(vrc)) 813 vrc = rc2; 814 } 815 816 LogFlowFuncLeaveRC(vrc); 817 return vrc; 818 818 } 819 819 … … 826 826 mData.mPID, pData->u32HandleId, pData->u32Flags, pData->pvData, pData->cbData, pCallback, pData)); 827 827 828 int rc = checkPID(pData->u32PID);829 if (RT_FAILURE( rc))830 return rc;828 int vrc = checkPID(pData->u32PID); 829 if (RT_FAILURE(vrc)) 830 return vrc; 831 831 832 832 /* First, signal callback in every case (if available). */ 833 833 if (pCallback) 834 834 { 835 rc = pCallback->SetData(pData, sizeof(CALLBACKDATAEXECOUT));835 vrc = pCallback->SetData(pData, sizeof(CALLBACKDATAEXECOUT)); 836 836 837 837 int rc2 = pCallback->Signal(); 838 if (RT_SUCCESS( rc))839 rc = rc2;838 if (RT_SUCCESS(vrc)) 839 vrc = rc2; 840 840 } 841 841 … … 865 865 int rc2 = signalWaiters( pData->u32HandleId == OUTPUT_HANDLE_ID_STDOUT 866 866 ? ProcessWaitResult_StdOut : ProcessWaitResult_StdErr); 867 if (RT_SUCCESS( rc))868 rc = rc2;869 } 870 871 LogFlowFuncLeaveRC( rc);872 return rc;867 if (RT_SUCCESS(vrc)) 868 vrc = rc2; 869 } 870 871 LogFlowFuncLeaveRC(vrc); 872 return vrc; 873 873 } 874 874 … … 894 894 895 895 /* Create callback and add it to the map. */ 896 int rc = pCallbackRead->Init(VBOXGUESTCTRLCALLBACKTYPE_EXEC_OUTPUT);897 if (RT_SUCCESS( rc))898 rc = callbackAdd(pCallbackRead, &uContextID);896 int vrc = pCallbackRead->Init(VBOXGUESTCTRLCALLBACKTYPE_EXEC_OUTPUT); 897 if (RT_SUCCESS(vrc)) 898 vrc = callbackAdd(pCallbackRead, &uContextID); 899 899 900 900 alock.release(); /* Drop the write lock again. */ 901 901 902 if (RT_SUCCESS( rc))902 if (RT_SUCCESS(vrc)) 903 903 { 904 904 VBOXHGCMSVCPARM paParms[5]; … … 910 910 paParms[i++].setUInt32(0 /* Flags, none set yet. */); 911 911 912 rc = sendCommand(HOST_EXEC_GET_OUTPUT, i, paParms);913 } 914 915 if (RT_SUCCESS( rc))912 vrc = sendCommand(HOST_EXEC_GET_OUTPUT, i, paParms); 913 } 914 915 if (RT_SUCCESS(vrc)) 916 916 { 917 917 /* … … 920 920 */ 921 921 LogFlowThisFunc(("Waiting for callback (%RU32ms) ...\n", uTimeoutMS)); 922 rc = pCallbackRead->Wait(uTimeoutMS);923 if (RT_SUCCESS( rc)) /* Wait was successful, check for supplied information. */924 { 925 rc = pCallbackRead->GetResultCode();926 LogFlowThisFunc(("Callback returned rc=%Rrc, cbData=%RU32\n",rc, pCallbackRead->GetDataSize()));927 928 if (RT_SUCCESS( rc))922 vrc = pCallbackRead->Wait(uTimeoutMS); 923 if (RT_SUCCESS(vrc)) /* Wait was successful, check for supplied information. */ 924 { 925 vrc = pCallbackRead->GetResultCode(); 926 LogFlowThisFunc(("Callback returned vrc=%Rrc, cbData=%RU32\n", vrc, pCallbackRead->GetDataSize())); 927 928 if (RT_SUCCESS(vrc)) 929 929 { 930 930 Assert(pCallbackRead->GetDataSize() == sizeof(CALLBACKDATAEXECOUT)); … … 946 946 } 947 947 else 948 rc = VERR_TIMEOUT;948 vrc = VERR_TIMEOUT; 949 949 } 950 950 … … 953 953 AssertPtr(pCallbackRead); 954 954 int rc2 = callbackRemove(uContextID); 955 if (RT_SUCCESS( rc))956 rc = rc2;957 958 LogFlowFuncLeaveRC( rc);959 return rc;955 if (RT_SUCCESS(vrc)) 956 vrc = rc2; 957 958 LogFlowFuncLeaveRC(vrc); 959 return vrc; 960 960 } 961 961 … … 973 973 974 974 LogFlowThisFunc(("uFunction=%RU32, uParms=%RU32\n", uFunction, uParms)); 975 int rc = pVMMDev->hgcmHostCall("VBoxGuestControlSvc", uFunction, uParms, paParms);976 if (RT_FAILURE( rc))975 int vrc = pVMMDev->hgcmHostCall("VBoxGuestControlSvc", uFunction, uParms, paParms); 976 if (RT_FAILURE(vrc)) 977 977 { 978 978 int rc2; 979 if ( rc == VERR_INVALID_VM_HANDLE)980 rc2 = setErrorInternal( rc, tr("VMM device is not available (is the VM running?)"));981 else if ( rc == VERR_NOT_FOUND)982 rc2 = setErrorInternal( rc, tr("The guest execution service is not ready (yet)"));983 else if ( rc == VERR_HGCM_SERVICE_NOT_FOUND)984 rc2 = setErrorInternal( rc, tr("The guest execution service is not available"));979 if (vrc == VERR_INVALID_VM_HANDLE) 980 rc2 = setErrorInternal(vrc, tr("VMM device is not available (is the VM running?)")); 981 else if (vrc == VERR_NOT_FOUND) 982 rc2 = setErrorInternal(vrc, tr("The guest execution service is not ready (yet)")); 983 else if (vrc == VERR_HGCM_SERVICE_NOT_FOUND) 984 rc2 = setErrorInternal(vrc, tr("The guest execution service is not available")); 985 985 else 986 rc2 = setErrorInternal( rc, Utf8StrFmt(tr("The HGCM call failed with error %Rrc"),rc));986 rc2 = setErrorInternal(vrc, Utf8StrFmt(tr("The HGCM call failed with error %Rrc"), vrc)); 987 987 AssertRC(rc2); 988 988 } 989 989 990 LogFlowFuncLeaveRC( rc);991 return rc;990 LogFlowFuncLeaveRC(vrc); 991 return vrc; 992 992 } 993 993 994 994 /* Does not do locking; caller is responsible for that! */ 995 int GuestProcess::setErrorInternal(int rc, const Utf8Str &strMessage)996 { 997 LogFlowThisFunc((" rc=%Rrc, strMsg=%s\n",rc, strMessage.c_str()));998 999 Assert(RT_FAILURE( rc));995 int GuestProcess::setErrorInternal(int vrc, const Utf8Str &strMessage) 996 { 997 LogFlowThisFunc(("vrc=%Rrc, strMsg=%s\n", vrc, strMessage.c_str())); 998 999 Assert(RT_FAILURE(vrc)); 1000 1000 Assert(!strMessage.isEmpty()); 1001 1001 … … 1008 1008 1009 1009 mData.mStatus = ProcessStatus_Error; 1010 mData.mRC = rc;1010 mData.mRC = vrc; 1011 1011 mData.mErrorMsg = strMessage; 1012 1012 … … 1029 1029 /* Note: No write locking here -- already done in the caller. */ 1030 1030 1031 int rc = VINF_SUCCESS;1031 int vrc = VINF_SUCCESS; 1032 1032 if (mData.mWaitEvent) 1033 rc = mData.mWaitEvent->Signal(enmWaitResult);1034 LogFlowFuncLeaveRC( rc);1035 return rc;1033 vrc = mData.mWaitEvent->Signal(enmWaitResult); 1034 LogFlowFuncLeaveRC(vrc); 1035 return vrc; 1036 1036 } 1037 1037 … … 1045 1045 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1046 1046 1047 int rc;1047 int vrc; 1048 1048 uint32_t uContextID = 0; 1049 1049 GuestCtrlCallback *pCallbackStart = new GuestCtrlCallback(); … … 1054 1054 1055 1055 /* Create callback and add it to the map. */ 1056 rc = pCallbackStart->Init(VBOXGUESTCTRLCALLBACKTYPE_EXEC_START);1057 if (RT_SUCCESS( rc))1058 rc = callbackAdd(pCallbackStart, &uContextID);1059 1060 if (RT_SUCCESS( rc))1056 vrc = pCallbackStart->Init(VBOXGUESTCTRLCALLBACKTYPE_EXEC_START); 1057 if (RT_SUCCESS(vrc)) 1058 vrc = callbackAdd(pCallbackStart, &uContextID); 1059 1060 if (RT_SUCCESS(vrc)) 1061 1061 { 1062 1062 GuestSession *pSession = mData.mParent; … … 1072 1072 char **papszArgv = (char**)RTMemAlloc(sizeof(char*) * (cArgs + 1)); 1073 1073 AssertReturn(papszArgv, VERR_NO_MEMORY); 1074 for (size_t i = 0; RT_SUCCESS( rc) && i < cArgs; i++)1075 rc = RTStrDupEx(&papszArgv[i], mData.mProcess.mArguments[i].c_str());1074 for (size_t i = 0; RT_SUCCESS(vrc) && i < cArgs; i++) 1075 vrc = RTStrDupEx(&papszArgv[i], mData.mProcess.mArguments[i].c_str()); 1076 1076 papszArgv[cArgs] = NULL; 1077 1077 1078 if (RT_SUCCESS( rc))1079 rc = RTGetOptArgvToString(&pszArgs, papszArgv, RTGETOPTARGV_CNV_QUOTE_MS_CRT);1078 if (RT_SUCCESS(vrc)) 1079 vrc = RTGetOptArgvToString(&pszArgs, papszArgv, RTGETOPTARGV_CNV_QUOTE_MS_CRT); 1080 1080 } 1081 1081 size_t cbArgs = pszArgs ? strlen(pszArgs) + 1 : 0; /* Include terminating zero. */ … … 1084 1084 void *pvEnv = NULL; 1085 1085 size_t cbEnv = 0; 1086 rc = mData.mProcess.mEnvironment.BuildEnvironmentBlock(&pvEnv, &cbEnv, NULL /* cEnv */);1087 1088 if (RT_SUCCESS( rc))1086 vrc = mData.mProcess.mEnvironment.BuildEnvironmentBlock(&pvEnv, &cbEnv, NULL /* cEnv */); 1087 1088 if (RT_SUCCESS(vrc)) 1089 1089 { 1090 1090 /* Prepare HGCM call. */ … … 1116 1116 1117 1117 /* Note: Don't hold the write lock in here, because setErrorInternal */ 1118 rc = sendCommand(HOST_EXEC_CMD, i, paParms);1118 vrc = sendCommand(HOST_EXEC_CMD, i, paParms); 1119 1119 } 1120 1120 … … 1128 1128 alock.release(); 1129 1129 1130 if (RT_SUCCESS( rc))1130 if (RT_SUCCESS(vrc)) 1131 1131 { 1132 1132 /* … … 1135 1135 */ 1136 1136 LogFlowThisFunc(("Waiting for callback (%RU32ms) ...\n", uTimeoutMS)); 1137 rc = pCallbackStart->Wait(uTimeoutMS);1138 if (RT_SUCCESS( rc)) /* Wait was successful, check for supplied information. */1137 vrc = pCallbackStart->Wait(uTimeoutMS); 1138 if (RT_SUCCESS(vrc)) /* Wait was successful, check for supplied information. */ 1139 1139 { 1140 rc = pCallbackStart->GetResultCode();1141 LogFlowThisFunc(("Callback returned rc=%Rrc\n",rc));1140 vrc = pCallbackStart->GetResultCode(); 1141 LogFlowThisFunc(("Callback returned vrc=%Rrc\n", vrc)); 1142 1142 } 1143 1143 else 1144 rc = VERR_TIMEOUT;1144 vrc = VERR_TIMEOUT; 1145 1145 } 1146 1146 … … 1149 1149 AssertPtr(pCallbackStart); 1150 1150 int rc2 = callbackRemove(uContextID); 1151 if (RT_SUCCESS( rc))1152 rc = rc2;1153 } 1154 1155 LogFlowFuncLeaveRC( rc);1156 return rc;1151 if (RT_SUCCESS(vrc)) 1152 vrc = rc2; 1153 } 1154 1155 LogFlowFuncLeaveRC(vrc); 1156 return vrc; 1157 1157 } 1158 1158 … … 1166 1166 AssertReturn(pTask->isOk(), pTask->rc()); 1167 1167 1168 int rc = RTThreadCreate(NULL, GuestProcess::startProcessThread,1168 int vrc = RTThreadCreate(NULL, GuestProcess::startProcessThread, 1169 1169 (void *)pTask.get(), 0, 1170 1170 RTTHREADTYPE_MAIN_WORKER, 0, 1171 1171 "gctlPrcStart"); 1172 if (RT_SUCCESS( rc))1172 if (RT_SUCCESS(vrc)) 1173 1173 { 1174 1174 /* pTask is now owned by startProcessThread(), so release it. */ … … 1176 1176 } 1177 1177 1178 LogFlowFuncLeaveRC( rc);1179 return rc;1178 LogFlowFuncLeaveRC(vrc); 1179 return vrc; 1180 1180 } 1181 1181 … … 1193 1193 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1194 1194 1195 int rc = pProcess->startProcess();1196 if (RT_FAILURE( rc))1195 int vrc = pProcess->startProcess(); 1196 if (RT_FAILURE(vrc)) 1197 1197 { 1198 1198 /** @todo What now? */ 1199 1199 } 1200 1200 1201 LogFlowFuncLeaveRC( rc);1202 return rc;1201 LogFlowFuncLeaveRC(vrc); 1202 return vrc; 1203 1203 } 1204 1204 … … 1344 1344 alock.release(); /* Release lock before waiting. */ 1345 1345 1346 int rc = mData.mWaitEvent->Wait(uTimeoutMS);1347 if (RT_SUCCESS( rc))1346 int vrc = mData.mWaitEvent->Wait(uTimeoutMS); 1347 if (RT_SUCCESS(vrc)) 1348 1348 waitRes = mData.mWaitEvent->GetResult(); 1349 1349 … … 1357 1357 mData.mWaitCount--; 1358 1358 1359 LogFlowFuncLeaveRC( rc);1360 return rc;1359 LogFlowFuncLeaveRC(vrc); 1360 return vrc; 1361 1361 } 1362 1362 … … 1365 1365 LogFlowThisFunc(("uTimeoutMS=%RU32\n", uTimeoutMS)); 1366 1366 1367 int rc = VINF_SUCCESS;1367 int vrc = VINF_SUCCESS; 1368 1368 1369 1369 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); … … 1373 1373 1374 1374 GuestProcessWaitResult waitRes; 1375 rc = waitFor(ProcessWaitForFlag_Start, uTimeoutMS, waitRes);1376 if ( RT_FAILURE( rc)1375 vrc = waitFor(ProcessWaitForFlag_Start, uTimeoutMS, waitRes); 1376 if ( RT_FAILURE(vrc) 1377 1377 || ( waitRes.mResult == ProcessWaitResult_Start 1378 1378 && waitRes.mResult == ProcessWaitResult_Any … … 1380 1380 ) 1381 1381 { 1382 if (RT_SUCCESS( rc))1383 rc = waitRes.mRC;1384 } 1385 } 1386 1387 LogFlowFuncLeaveRC( rc);1388 return rc;1382 if (RT_SUCCESS(vrc)) 1383 vrc = waitRes.mRC; 1384 } 1385 } 1386 1387 LogFlowFuncLeaveRC(vrc); 1388 return vrc; 1389 1389 } 1390 1390 … … 1407 1407 1408 1408 /* Create callback and add it to the map. */ 1409 int rc = pCallbackWrite->Init(VBOXGUESTCTRLCALLBACKTYPE_EXEC_INPUT_STATUS);1410 if (RT_SUCCESS( rc))1411 rc = callbackAdd(pCallbackWrite, &uContextID);1409 int vrc = pCallbackWrite->Init(VBOXGUESTCTRLCALLBACKTYPE_EXEC_INPUT_STATUS); 1410 if (RT_SUCCESS(vrc)) 1411 vrc = callbackAdd(pCallbackWrite, &uContextID); 1412 1412 1413 1413 alock.release(); /* Drop the write lock again. */ 1414 1414 1415 if (RT_SUCCESS( rc))1415 if (RT_SUCCESS(vrc)) 1416 1416 { 1417 1417 VBOXHGCMSVCPARM paParms[5]; … … 1424 1424 paParms[i++].setUInt32(cbData); 1425 1425 1426 rc = sendCommand(HOST_EXEC_SET_INPUT, i, paParms);1427 } 1428 1429 if (RT_SUCCESS( rc))1426 vrc = sendCommand(HOST_EXEC_SET_INPUT, i, paParms); 1427 } 1428 1429 if (RT_SUCCESS(vrc)) 1430 1430 { 1431 1431 /* … … 1434 1434 */ 1435 1435 LogFlowThisFunc(("Waiting for callback (%RU32ms) ...\n", uTimeoutMS)); 1436 rc = pCallbackWrite->Wait(uTimeoutMS);1437 if (RT_SUCCESS( rc)) /* Wait was successful, check for supplied information. */1438 { 1439 rc = pCallbackWrite->GetResultCode();1440 LogFlowThisFunc(("Callback returned rc=%Rrc, cbData=%RU32\n",rc, pCallbackWrite->GetDataSize()));1441 1442 if (RT_SUCCESS( rc))1436 vrc = pCallbackWrite->Wait(uTimeoutMS); 1437 if (RT_SUCCESS(vrc)) /* Wait was successful, check for supplied information. */ 1438 { 1439 vrc = pCallbackWrite->GetResultCode(); 1440 LogFlowThisFunc(("Callback returned vrc=%Rrc, cbData=%RU32\n", vrc, pCallbackWrite->GetDataSize())); 1441 1442 if (RT_SUCCESS(vrc)) 1443 1443 { 1444 1444 Assert(pCallbackWrite->GetDataSize() == sizeof(CALLBACKDATAEXECINSTATUS)); … … 1454 1454 1455 1455 case INPUT_STS_ERROR: 1456 rc = pData->u32Flags; /** @todo Fix int vs. uint32_t! */1456 vrc = pData->u32Flags; /** @todo Fix int vs. uint32_t! */ 1457 1457 break; 1458 1458 1459 1459 case INPUT_STS_TERMINATED: 1460 rc = VERR_CANCELLED;1460 vrc = VERR_CANCELLED; 1461 1461 break; 1462 1462 1463 1463 case INPUT_STS_OVERFLOW: 1464 rc = VERR_BUFFER_OVERFLOW;1464 vrc = VERR_BUFFER_OVERFLOW; 1465 1465 break; 1466 1466 … … 1477 1477 } 1478 1478 else 1479 rc = VERR_TIMEOUT;1479 vrc = VERR_TIMEOUT; 1480 1480 } 1481 1481 … … 1484 1484 AssertPtr(pCallbackWrite); 1485 1485 int rc2 = callbackRemove(uContextID); 1486 if (RT_SUCCESS( rc))1487 rc = rc2;1488 1489 LogFlowFuncLeaveRC( rc);1490 return rc;1486 if (RT_SUCCESS(vrc)) 1487 vrc = rc2; 1488 1489 LogFlowFuncLeaveRC(vrc); 1490 return vrc; 1491 1491 } 1492 1492 … … 1510 1510 1511 1511 size_t cbRead; 1512 int rc = readData(aHandle, aSize, aTimeoutMS, data.raw(), aSize, &cbRead);1513 if (RT_SUCCESS( rc))1512 int vrc = readData(aHandle, aSize, aTimeoutMS, data.raw(), aSize, &cbRead); 1513 if (RT_SUCCESS(vrc)) 1514 1514 { 1515 1515 if (data.size() != cbRead) … … 1519 1519 1520 1520 /** @todo Do setError() here. */ 1521 HRESULT hr = RT_SUCCESS( rc) ? S_OK : VBOX_E_IPRT_ERROR;1522 LogFlowFuncLeaveRC( rc);1521 HRESULT hr = RT_SUCCESS(vrc) ? S_OK : VBOX_E_IPRT_ERROR; 1522 LogFlowFuncLeaveRC(vrc); 1523 1523 1524 1524 return hr; … … 1536 1536 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1537 1537 1538 int rc = terminateProcess();1538 int vrc = terminateProcess(); 1539 1539 /** @todo Do setError() here. */ 1540 HRESULT hr = RT_SUCCESS( rc) ? S_OK : VBOX_E_IPRT_ERROR;1541 LogFlowFuncLeaveRC( rc);1540 HRESULT hr = RT_SUCCESS(vrc) ? S_OK : VBOX_E_IPRT_ERROR; 1541 LogFlowFuncLeaveRC(vrc); 1542 1542 1543 1543 return hr; … … 1563 1563 1564 1564 GuestProcessWaitResult waitRes; 1565 int rc = waitFor(aWaitFlags, aTimeoutMS, waitRes);1566 if (RT_SUCCESS( rc))1565 int vrc = waitFor(aWaitFlags, aTimeoutMS, waitRes); 1566 if (RT_SUCCESS(vrc)) 1567 1567 { 1568 1568 *aReason = waitRes.mResult; … … 1571 1571 else 1572 1572 { 1573 if ( rc == VERR_TIMEOUT)1573 if (vrc == VERR_TIMEOUT) 1574 1574 hr = setError(VBOX_E_IPRT_ERROR, 1575 1575 tr("Process \"%s\" (PID %RU32) did not respond within time (%RU32ms)"), … … 1577 1577 else 1578 1578 hr = setError(VBOX_E_IPRT_ERROR, 1579 tr("Waiting for process \"%s\" (PID %RU32) failed with rc=%Rrc"),1580 mData.mProcess.mCommand.c_str(), mData.mPID, rc);1581 } 1582 LogFlowFuncLeaveRC( rc);1579 tr("Waiting for process \"%s\" (PID %RU32) failed with vrc=%Rrc"), 1580 mData.mProcess.mCommand.c_str(), mData.mPID, vrc); 1581 } 1582 LogFlowFuncLeaveRC(vrc); 1583 1583 return hr; 1584 1584 #endif /* VBOX_WITH_GUEST_CONTROL */ … … 1625 1625 1626 1626 com::SafeArray<BYTE> data(ComSafeArrayInArg(aData)); 1627 int rc = writeData(aHandle, aFlags, data.raw(), data.size(), aTimeoutMS, (uint32_t*)aWritten);1627 int vrc = writeData(aHandle, aFlags, data.raw(), data.size(), aTimeoutMS, (uint32_t*)aWritten); 1628 1628 /** @todo Do setError() here. */ 1629 HRESULT hr = RT_SUCCESS( rc) ? S_OK : VBOX_E_IPRT_ERROR;1630 LogFlowFuncLeaveRC( rc);1629 HRESULT hr = RT_SUCCESS(vrc) ? S_OK : VBOX_E_IPRT_ERROR; 1630 LogFlowFuncLeaveRC(vrc); 1631 1631 1632 1632 return hr;
Note:
See TracChangeset
for help on using the changeset viewer.