VirtualBox

Changeset 76908 in vbox for trunk/src/VBox/Runtime/r3/posix


Ignore:
Timestamp:
Jan 21, 2019 8:28:43 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128277
Message:

Runtime/posix/serialport-posix: Fix access to pseudo terminals, they fail TIOCMBIC and TIOCMGET with EINVAL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/serialport-posix.cpp

    r76553 r76908  
    266266                int fTiocmClear = TIOCM_LOOP;
    267267                rcPsx = ioctl(pThis->iFd, TIOCMBIC, &fTiocmClear);
    268                 if (rcPsx == -1)
     268                if (rcPsx == -1 && errno != EINVAL) /* Pseudo terminals don't support loopback mode so ignore an error here. */
    269269                    rc = RTErrConvertFromErrno(errno);
    270270            }
     
    623623        }
    624624    }
    625     else if (errno == ENOTTY)
     625    else if (errno == ENOTTY || errno == EINVAL)
    626626        rc = VERR_NOT_SUPPORTED;
    627627    else
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