VirtualBox

Ignore:
Timestamp:
Jul 14, 2009 2:50:24 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: RTFILE_O_APPEND.

File:
1 edited

Legend:

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

    r21500 r21582  
    167167    switch (fOpen & RTFILE_O_ACCESS_MASK)
    168168    {
    169         case RTFILE_O_READ:             fOpenMode |= O_RDONLY; break;
    170         case RTFILE_O_WRITE:            fOpenMode |= O_WRONLY; break;
    171         case RTFILE_O_READWRITE:        fOpenMode |= O_RDWR; break;
     169        case RTFILE_O_READ:
     170            fOpenMode |= O_RDONLY; /* RTFILE_O_APPEND is ignored. */
     171            break;
     172        case RTFILE_O_WRITE:
     173            fOpenMode |= (fOpen & RTFILE_O_APPEND)? O_APPEND | O_WRONLY: O_WRONLY;
     174            break;
     175        case RTFILE_O_READWRITE:
     176            fOpenMode |= (fOpen & RTFILE_O_APPEND)? O_APPEND | O_RDWR: O_RDWR;
     177            break;
    172178        default:
    173179            AssertMsgFailed(("RTFileOpen received an invalid RW value, fOpen=%#x\n", fOpen));
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