Changeset 98288 in vbox for trunk/src/VBox/Main/src-server/freebsd
- Timestamp:
- Jan 24, 2023 3:32:43 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155493
- Location:
- trunk/src/VBox/Main/src-server/freebsd
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/freebsd/HostHardwareFreeBSD.cpp
r98103 r98288 126 126 { 127 127 LogFlowThisFunc(("entered\n")); 128 int rc;128 int vrc; 129 129 try 130 130 { … … 133 133 * environment variable. */ 134 134 bool fSuccess = false; /* Have we succeeded in finding anything yet? */ 135 rc = getDriveInfoFromEnv("VBOX_CDROM", &mDVDList, true /* isDVD */, &fSuccess);136 if (RT_SUCCESS( rc) && !fSuccess)137 rc = getDriveInfoFromCAM(&mDVDList, DVD, &fSuccess);135 vrc = getDriveInfoFromEnv("VBOX_CDROM", &mDVDList, true /* isDVD */, &fSuccess); 136 if (RT_SUCCESS(vrc) && !fSuccess) 137 vrc = getDriveInfoFromCAM(&mDVDList, DVD, &fSuccess); 138 138 } 139 139 catch (std::bad_alloc &) 140 140 { 141 rc = VERR_NO_MEMORY;142 } 143 LogFlowThisFunc((" rc=%Rrc\n",rc));144 return rc;141 vrc = VERR_NO_MEMORY; 142 } 143 LogFlowThisFunc(("vrc=%Rrc\n", vrc)); 144 return vrc; 145 145 } 146 146 … … 148 148 { 149 149 LogFlowThisFunc(("entered\n")); 150 int rc;150 int vrc; 151 151 try 152 152 { … … 154 154 mFloppyList.clear(); 155 155 bool fSuccess = false; /* ignored */ 156 rc = getDriveInfoFromEnv("VBOX_FLOPPY", &mFloppyList, false /* isDVD */, &fSuccess);156 vrc = getDriveInfoFromEnv("VBOX_FLOPPY", &mFloppyList, false /* isDVD */, &fSuccess); 157 157 } 158 158 catch (std::bad_alloc &) 159 159 { 160 rc = VERR_NO_MEMORY;161 } 162 LogFlowThisFunc((" rc=%Rrc\n",rc));163 return rc;160 vrc = VERR_NO_MEMORY; 161 } 162 LogFlowThisFunc(("vrc=%Rrc\n", vrc)); 163 return vrc; 164 164 } 165 165 … … 167 167 { 168 168 LogFlowThisFunc(("entered\n")); 169 int rc;169 int vrc; 170 170 try 171 171 { 172 172 mFixedDriveList.clear(); 173 173 bool fSuccess = false; /* ignored */ 174 rc = getDriveInfoFromCAM(&mFixedDriveList, Fixed, &fSuccess);174 vrc = getDriveInfoFromCAM(&mFixedDriveList, Fixed, &fSuccess); 175 175 } 176 176 catch (std::bad_alloc &) 177 177 { 178 rc = VERR_NO_MEMORY;179 } 180 LogFlowThisFunc((" rc=%Rrc\n",rc));181 return rc;178 vrc = VERR_NO_MEMORY; 179 } 180 LogFlowThisFunc(("vrc=%Rrc\n", vrc)); 181 return vrc; 182 182 } 183 183 … … 324 324 { 325 325 RTFILE hFileXpt = NIL_RTFILE; 326 int rc = RTFileOpen(&hFileXpt, "/dev/xpt0", RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);327 if (RT_SUCCESS( rc))326 int vrc = RTFileOpen(&hFileXpt, "/dev/xpt0", RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE); 327 if (RT_SUCCESS(vrc)) 328 328 { 329 329 union ccb DeviceCCB; … … 377 377 do 378 378 { 379 rc = RTFileIoCtl(hFileXpt, CAMIOCOMMAND, &DeviceCCB, sizeof(union ccb), NULL);380 if (RT_FAILURE( rc))379 vrc = RTFileIoCtl(hFileXpt, CAMIOCOMMAND, &DeviceCCB, sizeof(union ccb), NULL); 380 if (RT_FAILURE(vrc)) 381 381 { 382 Log(("Error while querying available CD/DVD devices rc=%Rrc\n",rc));382 Log(("Error while querying available CD/DVD devices vrc=%Rrc\n", vrc)); 383 383 break; 384 384 } … … 431 431 do 432 432 { 433 rc = RTFileIoCtl(hFileXpt, CAMIOCOMMAND, &PeriphCCB, sizeof(union ccb), NULL);434 if (RT_FAILURE( rc))433 vrc = RTFileIoCtl(hFileXpt, CAMIOCOMMAND, &PeriphCCB, sizeof(union ccb), NULL); 434 if (RT_FAILURE(vrc)) 435 435 { 436 Log(("Error while querying available periph devices rc=%Rrc\n",rc));436 Log(("Error while querying available periph devices vrc=%Rrc\n", vrc)); 437 437 break; 438 438 } … … 479 479 { 480 480 pList->clear(); 481 rc = VERR_NO_MEMORY;481 vrc = VERR_NO_MEMORY; 482 482 break; 483 483 } … … 489 489 } while ( DeviceCCB.ccb_h.status == CAM_REQ_CMP 490 490 && DeviceCCB.cdm.status == CAM_DEV_MATCH_MORE 491 && RT_SUCCESS( rc));491 && RT_SUCCESS(vrc)); 492 492 493 493 RTMemFree(paMatches); 494 494 } 495 495 else 496 rc = VERR_NO_MEMORY;496 vrc = VERR_NO_MEMORY; 497 497 498 498 RTFileClose(hFileXpt); 499 499 } 500 500 501 return rc;501 return vrc; 502 502 } 503 503 … … 524 524 AssertPtrNullReturn(pfSuccess, VERR_INVALID_POINTER); 525 525 LogFlowFunc(("pcszVar=%s, pList=%p, isDVD=%d, pfSuccess=%p\n", pcszVar, pList, isDVD, pfSuccess)); 526 int rc = VINF_SUCCESS;526 int vrc = VINF_SUCCESS; 527 527 bool success = false; 528 528 char *pszFreeMe = RTEnvDupEx(RTENV_DEFAULT, pcszVar); … … 552 552 catch (std::bad_alloc &) 553 553 { 554 rc = VERR_NO_MEMORY;554 vrc = VERR_NO_MEMORY; 555 555 } 556 556 RTStrFree(pszFreeMe); 557 LogFlowFunc((" rc=%Rrc, success=%d\n",rc, success));558 return rc;559 } 560 557 LogFlowFunc(("vrc=%Rrc, success=%d\n", vrc, success)); 558 return vrc; 559 } 560 -
trunk/src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp
r98103 r98288 124 124 Log(("getDefaultIfaceIndex: Got message %u while expecting %u.\n", 125 125 pRtMsg->rtm_type, RTM_GET)); 126 // rc = VERR_INTERNAL_ERROR;126 //vrc = VERR_INTERNAL_ERROR; 127 127 continue; 128 128 } … … 212 212 int NetIfList(std::list <ComObjPtr<HostNetworkInterface> > &list) 213 213 { 214 int rc = VINF_SUCCESS;214 int vrc = VINF_SUCCESS; 215 215 size_t cbNeeded; 216 216 char *pBuf, *pNext; … … 220 220 221 221 /* Get the index of the interface associated with default route. */ 222 rc = getDefaultIfaceIndex(&u16DefaultIface, PF_INET);223 if (RT_FAILURE( rc))222 vrc = getDefaultIfaceIndex(&u16DefaultIface, PF_INET); 223 if (RT_FAILURE(vrc)) 224 224 { 225 225 fDefaultIfaceExistent = false; 226 rc = VINF_SUCCESS;226 vrc = VINF_SUCCESS; 227 227 } 228 228 … … 265 265 Log(("NetIfList: Got message %u while expecting %u.\n", 266 266 pIfMsg->ifm_type, RTM_IFINFO)); 267 rc = VERR_INTERNAL_ERROR;267 vrc = VERR_INTERNAL_ERROR; 268 268 break; 269 269 } … … 274 274 if (!pNew) 275 275 { 276 rc = VERR_NO_MEMORY;276 vrc = VERR_NO_MEMORY; 277 277 break; 278 278 } … … 342 342 close(sock); 343 343 free(pBuf); 344 return rc; 345 346 344 return vrc; 347 345 } 348 346 349 347 int NetIfGetConfigByName(PNETIFINFO pInfo) 350 348 { 351 int rc = VINF_SUCCESS;349 int vrc = VINF_SUCCESS; 352 350 size_t cbNeeded; 353 351 char *pBuf, *pNext; … … 392 390 Log(("NetIfList: Got message %u while expecting %u.\n", 393 391 pIfMsg->ifm_type, RTM_IFINFO)); 394 rc = VERR_INTERNAL_ERROR;392 vrc = VERR_INTERNAL_ERROR; 395 393 break; 396 394 } … … 443 441 close(sock); 444 442 free(pBuf); 445 return rc;443 return vrc; 446 444 } 447 445 -
trunk/src/VBox/Main/src-server/freebsd/PerformanceFreeBSD.cpp
r98103 r98288 69 69 int CollectorFreeBSD::getHostMemoryUsage(ULONG *total, ULONG *used, ULONG *available) 70 70 { 71 int rc = VINF_SUCCESS;71 int vrc = VINF_SUCCESS; 72 72 u_long cbMemPhys = 0; 73 73 u_int cPagesMemFree = 0; … … 105 105 } 106 106 else 107 rc = VERR_NOT_SUPPORTED;107 vrc = VERR_NOT_SUPPORTED; 108 108 109 return rc;109 return vrc; 110 110 } 111 111 -
trunk/src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp
r98103 r98288 88 88 * Create semaphore. 89 89 */ 90 int rc = RTSemEventCreate(&mNotifyEventSem);91 if (RT_FAILURE( rc))92 return rc;90 int vrc = RTSemEventCreate(&mNotifyEventSem); 91 if (RT_FAILURE(vrc)) 92 return vrc; 93 93 94 94 /* … … 222 222 int iBus = 0; 223 223 int iAddr = 1; 224 int rc = VINF_SUCCESS;224 int vrc = VINF_SUCCESS; 225 225 char *pszDevicePath = NULL; 226 226 uint32_t PlugTime = 0; … … 228 228 for (;;) 229 229 { 230 rc = RTStrAPrintf(&pszDevicePath, "/dev/%s%d.%d", USB_GENERIC_NAME, iBus, iAddr);231 if (RT_FAILURE( rc))230 vrc = RTStrAPrintf(&pszDevicePath, "/dev/%s%d.%d", USB_GENERIC_NAME, iBus, iAddr); 231 if (RT_FAILURE(vrc)) 232 232 break; 233 233 … … 260 260 RT_ZERO(UsbDevInfo); 261 261 262 rc = ioctl(FileUsb, USB_GET_DEVICEINFO, &UsbDevInfo);263 if ( rc < 0)262 vrc = ioctl(FileUsb, USB_GET_DEVICEINFO, &UsbDevInfo); 263 if (vrc < 0) 264 264 { 265 LogFlowFunc((": Error querying device info rc=%Rrc\n", RTErrConvertFromErrno(errno)));265 LogFlowFunc((": Error querying device info vrc=%Rrc\n", RTErrConvertFromErrno(errno))); 266 266 close(FileUsb); 267 267 RTStrFree(pszDevicePath); … … 331 331 pDevice->u64SerialHash = USBLibHashSerial(UsbDevInfo.udi_serial); 332 332 } 333 rc = ioctl(FileUsb, USB_GET_PLUGTIME, &PlugTime);334 if ( rc == 0)333 vrc = ioctl(FileUsb, USB_GET_PLUGTIME, &PlugTime); 334 if (vrc == 0) 335 335 pDevice->u64SerialHash += PlugTime; 336 336
Note:
See TracChangeset
for help on using the changeset viewer.