VirtualBox

Changeset 58768 in vbox


Ignore:
Timestamp:
Nov 19, 2015 1:32:08 PM (9 years ago)
Author:
vboxsync
Message:

RTFileOpen: Introduced RTFILE_O_ATTR_ONLY for windows only.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/file.h

    r58767 r58768  
    9898/** @name Open flags
    9999 * @{ */
     100/** Attribute access only.
     101 * @remarks Only accepted on windows, requires RTFILE_O_ACCESS_ATTR_MASK
     102 *          to yield a non-zero result.  Otherwise, this is invalid. */
     103#define RTFILE_O_ATTR_ONLY              UINT32_C(0x00000000)
    100104/** Open the file with read access. */
    101105#define RTFILE_O_READ                   UINT32_C(0x00000001)
     
    105109#define RTFILE_O_READWRITE              UINT32_C(0x00000003)
    106110/** The file access mask.
    107  * @remarks The value 0 is invalid. */
     111 * @remarks The value 0 is invalid, except for windows special case. */
    108112#define RTFILE_O_ACCESS_MASK            UINT32_C(0x00000003)
    109113
  • trunk/src/VBox/Runtime/r3/win/fileio-win.cpp

    r58767 r58768  
    213213                            : FILE_GENERIC_READ | FILE_GENERIC_WRITE;
    214214            break;
     215        case RTFILE_O_ATTR_ONLY:
     216            if (fOpen & RTFILE_O_ACCESS_ATTR_MASK)
     217            {
     218                dwDesiredAccess = 0;
     219                break;
     220            }
     221            /* fall thru */
    215222        default:
    216223            AssertMsgFailed(("Impossible fOpen=%#llx\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