VirtualBox

Changeset 6262 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 7, 2008 12:50:11 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27104
Message:

serial: respect return code of ioctl

File:
1 edited

Legend:

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

    r6188 r6262  
    736736        if (pThread->enmState != PDMTHREADSTATE_RUNNING)
    737737            break;
    738 
    739         ioctl(pData->DeviceFile, TIOCMGET, &statusLines);
     738        if (rc < 0)
     739        {
     740ioctl_error:
     741            PDMDrvHlpVMSetRuntimeError(pDrvIns, false, "DrvHostSerialFail",
     742                                       N_("Ioctl failed for serial host device '%s' (error %d)"),
     743                                       pData->pszDevicePath, errno);
     744            break;
     745        }
     746
     747        rc = ioctl(pData->DeviceFile, TIOCMGET, &statusLines);
     748        if (rc < 0)
     749            goto ioctl_error;
    740750
    741751        if (statusLines & TIOCM_CAR)
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