VirtualBox

Changeset 60612 in vbox


Ignore:
Timestamp:
Apr 20, 2016 6:08:11 PM (8 years ago)
Author:
vboxsync
Message:

IPRT/dir-posix.cpp: custom errno mapping for fsync in RTDirFlush, because it otherwise gets rather confusing

File:
1 edited

Legend:

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

    r57358 r60612  
    184184            rc = VINF_SUCCESS;
    185185        else
    186             rc = RTErrConvertFromErrno(errno);
     186        {
     187            /* Linux fsync(2) man page documents both errors as an indication
     188             * that the file descriptor can't be flushed (seen EINVAL for usual
     189             * directories on CIFS). BSD (OS X) fsync(2) documents only the
     190             * latter, and Solaris fsync(3C) pretends there is no problem. */
     191            if (errno == EROFS || errno == EINVAL)
     192                rc = VERR_NOT_SUPPORTED;
     193            else
     194                rc = RTErrConvertFromErrno(errno);
     195        }
    187196        close(fd);
    188197    }
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