VirtualBox

Changeset 23973 in vbox for trunk/include


Ignore:
Timestamp:
Oct 22, 2009 12:34:22 PM (15 years ago)
Author:
vboxsync
Message:

*,RTFileOpen: Fixing RTFileOpen flag misdesign: The deny, access and action flags are mandatory now.

File:
1 edited

Legend:

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

    r23047 r23973  
    8787                                     /* 0x00000008 is unused atm. */
    8888
    89 /** Sharing mode: deny none (the default mode). */
    90 #define RTFILE_O_DENY_NONE              0x00000000
     89/** Sharing mode: deny none. */
     90#define RTFILE_O_DENY_NONE              0x00000080
    9191/** Sharing mode: deny read. */
    9292#define RTFILE_O_DENY_READ              0x00000010
     
    103103#define RTFILE_O_DENY_NOT_DELETE        0x00000040
    104104/** Sharing mode mask. */
    105 #define RTFILE_O_DENY_MASK              0x00000070
     105#define RTFILE_O_DENY_MASK              0x000000f0
    106106
    107107/** Action: Open an existing file (the default action). */
    108 #define RTFILE_O_OPEN                   0x00000000
     108#define RTFILE_O_OPEN                   0x00000700
    109109/** Action: Create a new file or open an existing one. */
    110110#define RTFILE_O_OPEN_CREATE            0x00000100
     
    114114#define RTFILE_O_CREATE_REPLACE         0x00000300
    115115/** Action mask. */
    116 #define RTFILE_O_ACTION_MASK            0x00000300
    117 
    118                                       /*0x00000400
    119                                     and 0x00000800 are unused atm. */
     116#define RTFILE_O_ACTION_MASK            0x00000700
     117
    120118/** Turns off indexing of files on Windows hosts, *CREATE* only.
    121119 * @remarks Window only. */
     
    201199 * @remark  This doesn't validate the access mode properly.
    202200 */
    203 #define RTFILE_O_VALID_MASK             0x1ffFFB77
     201#define RTFILE_O_VALID_MASK             0x1ffFFFF7
    204202
    205203/** @} */
     
    224222 * @param   pszFilename     Path to the file which is to be opened. (UTF-8)
    225223 * @param   fOpen           Open flags, i.e a combination of the RTFILE_O_* defines.
    226  */
    227 RTR3DECL(int)  RTFileOpen(PRTFILE pFile, const char *pszFilename, unsigned fOpen);
     224 *                          The ACCESS, ACTION and DENY flags are mandatory!
     225 */
     226RTR3DECL(int)  RTFileOpen(PRTFILE pFile, const char *pszFilename, uint32_t fOpen);
    228227
    229228/**
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