VirtualBox

Changeset 1533 in vbox


Ignore:
Timestamp:
Mar 16, 2007 3:03:48 PM (18 years ago)
Author:
vboxsync
Message:

Fix logging and error code handling.

Location:
trunk/src/VBox/Devices/Serial
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Serial/DrvChar.cpp

    r1512 r1533  
    9797{
    9898    PDRVCHAR pData = PDMICHAR_2_DRVCHAR(pInterface);
    99     int rc;
     99    int rc = VINF_SUCCESS;
    100100
    101101    LogFlow(("%s: pvBuf=%#p cbWrite=%d\n", __FUNCTION__, pvBuf, cbWrite));
  • trunk/src/VBox/Devices/Serial/DrvNamedPipe.cpp

    r1512 r1533  
    264264            {
    265265                rc = RTErrConvertFromWin32(hrc);
    266                 LogRel(("NamedPipe%d: ConnectNamedPipe failed rc=%Vrc\n", pData->pDrvIns->iInstance));
     266                LogRel(("NamedPipe%d: ConnectNamedPipe failed, rc=%Vrc\n", pData->pDrvIns->iInstancei, rc));
    267267                break;
    268268            }
     
    271271#else /* !__WIN__ */
    272272        if (listen(pData->LocalSocketServer, 0) == -1)
    273             LogRel(("NamedPipe%d: listen failed\n", pData->pDrvIns->iInstance));
     273        {
     274            rc = RTErrConvertFromErrno(errno);
     275            LogRel(("NamedPipe%d: listen failed, rc=%Vrc\n", pData->pDrvIns->iInstance, rc));
     276            break;
     277        }
    274278        int s = accept(pData->LocalSocketServer, NULL, NULL);
    275279        if (s == -1)
    276             LogRel(("NamedPipe%d: accept failed\n", pData->pDrvIns->iInstance));
     280        {
     281            rc = RTErrConvertFromErrno(errno);
     282            LogRel(("NamedPipe%d: accept failed, rc=%Vrc\n", pData->pDrvIns->iInstance, rc));
     283            break;
     284        }
    277285        else
    278286        {
Note: See TracChangeset for help on using the changeset viewer.

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