VirtualBox

Changeset 6271 in vbox for trunk


Ignore:
Timestamp:
Jan 8, 2008 8:45:43 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27116
Message:

serial: fixed error handling; be a little bit more verbose on errors

File:
1 edited

Legend:

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

    r6268 r6271  
    740740ioctl_error:
    741741            PDMDrvHlpVMSetRuntimeError(pDrvIns, false, "DrvHostSerialFail",
    742                                        N_("Ioctl failed for serial host device '%s' (error %d)"),
    743                                        pData->pszDevicePath, errno);
     742                                       N_("Ioctl failed for serial host device '%s' (%Vrc). The device will not work properly"),
     743                                       pData->pszDevicePath, RTErrConvertFromErrno(errno));
    744744            break;
    745745        }
     
    765765/**
    766766 * Unblock the monitor thread so it can respond to a state change.
     767 * We need to execute this code exactly once during initialization.
     768 * But we don't want to block --- therefore this dedicated thread.
    767769 *
    768770 * @returns a VBox status code.
     
    773775{
    774776    PDRVHOSTSERIAL pData = PDMINS2DATA(pDrvIns, PDRVHOSTSERIAL);
    775     int rc = VINF_SUCCESS;
     777    int rc;
    776778
    777779    /*
     
    794796     */
    795797    rc = ioctl(pData->DeviceFile, TIOCMBIC, TIOCM_LOOP);
    796     if (rc < 0)
    797         goto ioctl_error;
     798    if (rc >= 0)
     799        return VINF_SUCCESS;
    798800
    799801ioctl_error:
    800802    PDMDrvHlpVMSetRuntimeError(pDrvIns, false, "DrvHostSerialFail",
    801                                 N_("Ioctl failed for serial host device '%s' (error %d)"),
    802                                 pData->pszDevicePath, errno);
    803 
     803                                N_("Ioctl failed for serial host device '%s' (%Vrc). The device will not work properly"),
     804                                pData->pszDevicePath, RTErrConvertFromErrno(errno));
    804805    return VINF_SUCCESS;
    805806}
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