VirtualBox

Ignore:
Timestamp:
Jan 24, 2023 3:32:43 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
155493
Message:

Main/src-server: rc -> hrc/vrc (partial). bugref:10223

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  
    126126{
    127127    LogFlowThisFunc(("entered\n"));
    128     int rc;
     128    int vrc;
    129129    try
    130130    {
     
    133133         * environment variable. */
    134134        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);
    138138    }
    139139    catch (std::bad_alloc &)
    140140    {
    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;
    145145}
    146146
     
    148148{
    149149    LogFlowThisFunc(("entered\n"));
    150     int rc;
     150    int vrc;
    151151    try
    152152    {
     
    154154        mFloppyList.clear();
    155155        bool fSuccess = false;  /* ignored */
    156         rc = getDriveInfoFromEnv("VBOX_FLOPPY", &mFloppyList, false /* isDVD */, &fSuccess);
     156        vrc = getDriveInfoFromEnv("VBOX_FLOPPY", &mFloppyList, false /* isDVD */, &fSuccess);
    157157    }
    158158    catch (std::bad_alloc &)
    159159    {
    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;
    164164}
    165165
     
    167167{
    168168    LogFlowThisFunc(("entered\n"));
    169     int rc;
     169    int vrc;
    170170    try
    171171    {
    172172        mFixedDriveList.clear();
    173173        bool fSuccess = false;  /* ignored */
    174         rc = getDriveInfoFromCAM(&mFixedDriveList, Fixed, &fSuccess);
     174        vrc = getDriveInfoFromCAM(&mFixedDriveList, Fixed, &fSuccess);
    175175    }
    176176    catch (std::bad_alloc &)
    177177    {
    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;
    182182}
    183183
     
    324324{
    325325    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))
    328328    {
    329329        union ccb DeviceCCB;
     
    377377            do
    378378            {
    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))
    381381                {
    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));
    383383                    break;
    384384                }
     
    431431                        do
    432432                        {
    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))
    435435                            {
    436                                 Log(("Error while querying available periph devices rc=%Rrc\n", rc));
     436                                Log(("Error while querying available periph devices vrc=%Rrc\n", vrc));
    437437                                break;
    438438                            }
     
    479479                            {
    480480                                pList->clear();
    481                                 rc = VERR_NO_MEMORY;
     481                                vrc = VERR_NO_MEMORY;
    482482                                break;
    483483                            }
     
    489489            } while (   DeviceCCB.ccb_h.status == CAM_REQ_CMP
    490490                     && DeviceCCB.cdm.status == CAM_DEV_MATCH_MORE
    491                      && RT_SUCCESS(rc));
     491                     && RT_SUCCESS(vrc));
    492492
    493493            RTMemFree(paMatches);
    494494        }
    495495        else
    496             rc = VERR_NO_MEMORY;
     496            vrc = VERR_NO_MEMORY;
    497497
    498498        RTFileClose(hFileXpt);
    499499    }
    500500
    501     return rc;
     501    return vrc;
    502502}
    503503
     
    524524    AssertPtrNullReturn(pfSuccess, VERR_INVALID_POINTER);
    525525    LogFlowFunc(("pcszVar=%s, pList=%p, isDVD=%d, pfSuccess=%p\n", pcszVar, pList, isDVD, pfSuccess));
    526     int rc = VINF_SUCCESS;
     526    int vrc = VINF_SUCCESS;
    527527    bool success = false;
    528528    char *pszFreeMe = RTEnvDupEx(RTENV_DEFAULT, pcszVar);
     
    552552    catch (std::bad_alloc &)
    553553    {
    554         rc = VERR_NO_MEMORY;
     554        vrc = VERR_NO_MEMORY;
    555555    }
    556556    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  
    124124            Log(("getDefaultIfaceIndex: Got message %u while expecting %u.\n",
    125125                 pRtMsg->rtm_type, RTM_GET));
    126             //rc = VERR_INTERNAL_ERROR;
     126            //vrc = VERR_INTERNAL_ERROR;
    127127            continue;
    128128        }
     
    212212int NetIfList(std::list <ComObjPtr<HostNetworkInterface> > &list)
    213213{
    214     int rc = VINF_SUCCESS;
     214    int vrc = VINF_SUCCESS;
    215215    size_t cbNeeded;
    216216    char *pBuf, *pNext;
     
    220220
    221221    /* 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))
    224224    {
    225225        fDefaultIfaceExistent = false;
    226         rc = VINF_SUCCESS;
     226        vrc = VINF_SUCCESS;
    227227    }
    228228
     
    265265            Log(("NetIfList: Got message %u while expecting %u.\n",
    266266                 pIfMsg->ifm_type, RTM_IFINFO));
    267             rc = VERR_INTERNAL_ERROR;
     267            vrc = VERR_INTERNAL_ERROR;
    268268            break;
    269269        }
     
    274274        if (!pNew)
    275275        {
    276             rc = VERR_NO_MEMORY;
     276            vrc = VERR_NO_MEMORY;
    277277            break;
    278278        }
     
    342342    close(sock);
    343343    free(pBuf);
    344     return rc;
    345 
    346 
     344    return vrc;
    347345}
    348346
    349347int NetIfGetConfigByName(PNETIFINFO pInfo)
    350348{
    351     int rc = VINF_SUCCESS;
     349    int vrc = VINF_SUCCESS;
    352350    size_t cbNeeded;
    353351    char *pBuf, *pNext;
     
    392390            Log(("NetIfList: Got message %u while expecting %u.\n",
    393391                 pIfMsg->ifm_type, RTM_IFINFO));
    394             rc = VERR_INTERNAL_ERROR;
     392            vrc = VERR_INTERNAL_ERROR;
    395393            break;
    396394        }
     
    443441    close(sock);
    444442    free(pBuf);
    445     return rc;
     443    return vrc;
    446444}
    447445
  • trunk/src/VBox/Main/src-server/freebsd/PerformanceFreeBSD.cpp

    r98103 r98288  
    6969int CollectorFreeBSD::getHostMemoryUsage(ULONG *total, ULONG *used, ULONG *available)
    7070{
    71     int rc = VINF_SUCCESS;
     71    int vrc = VINF_SUCCESS;
    7272    u_long cbMemPhys = 0;
    7373    u_int cPagesMemFree = 0;
     
    105105    }
    106106    else
    107         rc = VERR_NOT_SUPPORTED;
     107        vrc = VERR_NOT_SUPPORTED;
    108108
    109     return rc;
     109    return vrc;
    110110}
    111111
  • trunk/src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp

    r98103 r98288  
    8888     * Create semaphore.
    8989     */
    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;
    9393
    9494    /*
     
    222222    int iBus  = 0;
    223223    int iAddr = 1;
    224     int rc = VINF_SUCCESS;
     224    int vrc = VINF_SUCCESS;
    225225    char *pszDevicePath = NULL;
    226226    uint32_t PlugTime = 0;
     
    228228    for (;;)
    229229    {
    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))
    232232            break;
    233233
     
    260260        RT_ZERO(UsbDevInfo);
    261261
    262         rc = ioctl(FileUsb, USB_GET_DEVICEINFO, &UsbDevInfo);
    263         if (rc < 0)
     262        vrc = ioctl(FileUsb, USB_GET_DEVICEINFO, &UsbDevInfo);
     263        if (vrc < 0)
    264264        {
    265             LogFlowFunc((": Error querying device info rc=%Rrc\n", RTErrConvertFromErrno(errno)));
     265            LogFlowFunc((": Error querying device info vrc=%Rrc\n", RTErrConvertFromErrno(errno)));
    266266            close(FileUsb);
    267267            RTStrFree(pszDevicePath);
     
    331331                pDevice->u64SerialHash = USBLibHashSerial(UsbDevInfo.udi_serial);
    332332            }
    333             rc = ioctl(FileUsb, USB_GET_PLUGTIME, &PlugTime);
    334             if (rc == 0)
     333            vrc = ioctl(FileUsb, USB_GET_PLUGTIME, &PlugTime);
     334            if (vrc == 0)
    335335                pDevice->u64SerialHash  += PlugTime;
    336336
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette