Changeset 19350 in vbox
- Timestamp:
- May 5, 2009 2:44:04 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/file.h
r19185 r19350 714 714 * @param cbMax The maximum number of bytes to read into memory. Specify RTFOFF_MAX 715 715 * to read to the end of the file. 716 * @param fFlags Flags for the future, must be 0.716 * @param fFlags See RTFILE_RDALL_*. 717 717 * @param ppvFile Where to store the pointer to the memory on successful return. 718 718 * @param pcbFile Where to store the size of the file on successful return. … … 746 746 * @param cbMax The maximum number of bytes to read into memory. Specify RTFOFF_MAX 747 747 * to read to the end of the file. 748 * @param fFlags Flags for the future, must be 0.748 * @param fFlags See RTFILE_RDALL_*. 749 749 * @param ppvFile Where to store the pointer to the memory on successful return. 750 750 * @param pcbFile Where to store the size of the file on successful return. … … 763 763 RTDECL(void) RTFileReadAllFree(void *pvFile, size_t cbFile); 764 764 765 /** @name RTFileReadAllEx and RTFileReadAllHandleEx flags 766 * The open flags are ignored by RTFileReadAllHandleEx. 767 * @{ */ 768 #define RTFILE_RDALL_O_DENY_NONE RTFILE_O_DENY_NONE 769 #define RTFILE_RDALL_O_DENY_READ RTFILE_O_DENY_READ 770 #define RTFILE_RDALL_O_DENY_WRITE RTFILE_O_DENY_WRITE 771 #define RTFILE_RDALL_O_DENY_READWRITE RTFILE_O_DENY_READWRITE 772 #define RTFILE_RDALL_O_DENY_ALL RTFILE_O_DENY_ALL 773 #define RTFILE_RDALL_O_DENY_NOT_DELETE RTFILE_O_DENY_NOT_DELETE 774 #define RTFILE_RDALL_O_DENY_MASK RTFILE_O_DENY_MASK 775 /** Mask of valid flags. */ 776 #define RTFILE_RDALL_VALID_MASK RTFILE_RDALL_O_DENY_MASK 777 /** @} */ 765 778 766 779 -
trunk/src/VBox/Disassembler/testcase/tstDisasm-2.cpp
r18458 r19350 990 990 void *pvFile; 991 991 size_t cbFile; 992 rc = RTFileReadAllEx(argv[iArg], off, cbMax, 0, &pvFile, &cbFile);992 rc = RTFileReadAllEx(argv[iArg], off, cbMax, RTFILE_RDALL_O_DENY_NONE, &pvFile, &cbFile); 993 993 if (RT_FAILURE(rc)) 994 994 { -
trunk/src/VBox/Runtime/generic/RTFileReadAllByHandleEx-generic.cpp
r8954 r19350 43 43 RTDECL(int) RTFileReadAllByHandleEx(RTFILE File, RTFOFF off, RTFOFF cbMax, uint32_t fFlags, void **ppvFile, size_t *pcbFile) 44 44 { 45 AssertReturn(! fFlags, VERR_INVALID_PARAMETER);45 AssertReturn(!(fFlags & ~RTFILE_RDALL_VALID_MASK), VERR_INVALID_PARAMETER); 46 46 47 47 /* -
trunk/src/VBox/Runtime/generic/RTFileReadAllEx-generic.cpp
r8925 r19350 41 41 RTDECL(int) RTFileReadAllEx(const char *pszFilename, RTFOFF off, RTFOFF cbMax, uint32_t fFlags, void **ppvFile, size_t *pcbFile) 42 42 { 43 AssertReturn(! fFlags, VERR_INVALID_PARAMETER);43 AssertReturn(!(fFlags & ~RTFILE_RDALL_VALID_MASK), VERR_INVALID_PARAMETER); 44 44 45 45 RTFILE File; 46 int rc = RTFileOpen(&File, pszFilename, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);46 int rc = RTFileOpen(&File, pszFilename, RTFILE_O_READ | RTFILE_O_OPEN | (fFlags & RTFILE_RDALL_O_DENY_MASK)); 47 47 if (RT_SUCCESS(rc)) 48 48 {
Note:
See TracChangeset
for help on using the changeset viewer.