VirtualBox

Changeset 94277 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 17, 2022 1:32:55 AM (3 years ago)
Author:
vboxsync
Message:

IPRT/RTFileFlush: Shut up annoying VERR_INVALID_PARAMETER returns on posix systems when trying to flush a tty.

File:
1 edited

Legend:

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

    r93115 r94277  
    833833
    834834
    835 RTR3DECL(int)  RTFileFlush(RTFILE hFile)
    836 {
    837     if (fsync(RTFileToNative(hFile)))
    838         return RTErrConvertFromErrno(errno);
    839     return VINF_SUCCESS;
     835RTR3DECL(int) RTFileFlush(RTFILE hFile)
     836{
     837    if (!fsync(RTFileToNative(hFile)))
     838        return VINF_SUCCESS;
     839    /* Ignore EINVAL here as that's what returned for pseudo ttys
     840       and other odd handles. */
     841    if (errno == EINVAL)
     842        return VINF_NOT_SUPPORTED;
     843    return RTErrConvertFromErrno(errno);
    840844}
    841845
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