VirtualBox

Changeset 26761 in vbox


Ignore:
Timestamp:
Feb 24, 2010 6:57:58 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: Implemented RTFileOpenBitBucket.

Location:
trunk/src/VBox/Runtime/r3
Files:
2 edited

Legend:

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

    r26344 r26761  
    335335
    336336
     337RTR3DECL(int)  RTFileOpenBitBucket(PRTFILE phFile, uint32_t fAccess)
     338{
     339    AssertReturn(   fAccess == RTFILE_O_READ
     340                 || fAccess == RTFILE_O_WRITE
     341                 || fAccess == RTFILE_O_READWRITE,
     342                 VERR_INVALID_PARAMETER);
     343    return RTFileOpen(phFile, "/dev/null", fAccess | RTFILE_O_DENY_NONE | RTFILE_O_OPEN);
     344}
     345
     346
    337347RTR3DECL(int)  RTFileClose(RTFILE File)
    338348{
  • trunk/src/VBox/Runtime/r3/win/fileio-win.cpp

    r25642 r26761  
    356356
    357357
     358RTR3DECL(int)  RTFileOpenBitBucket(PRTFILE phFile, uint32_t fAccess)
     359{
     360    AssertReturn(   fAccess == RTFILE_O_READ
     361                 || fAccess == RTFILE_O_WRITE
     362                 || fAccess == RTFILE_O_READWRITE,
     363                 VERR_INVALID_PARAMETER);
     364    return RTFileOpen(phFile, "NUL", fAccess | RTFILE_O_DENY_NONE | RTFILE_O_OPEN);
     365}
     366
     367
    358368RTR3DECL(int)  RTFileClose(RTFILE File)
    359369{
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