Changeset 69674 in vbox for trunk/src/VBox/Runtime/r3
- Timestamp:
- Nov 13, 2017 3:29:43 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 119042
- Location:
- trunk/src/VBox/Runtime/r3
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/dir.cpp
r69111 r69674 510 510 * @param pszFilter Pointer to where the filter start in the path. NULL if no filter. 511 511 * @param enmFilter The type of filter to apply. 512 */ 513 static int rtDirOpenCommon(PRTDIR *ppDir, const char *pszPath, const char *pszFilter, RTDIRFILTER enmFilter) 512 * @param fFlags RTDIR_F_XXX. 513 */ 514 static int rtDirOpenCommon(PRTDIR *ppDir, const char *pszPath, const char *pszFilter, RTDIRFILTER enmFilter, uint32_t fFlags) 514 515 { 515 516 /* … … 614 615 pDir->pszPath = (char *)memcpy(pb, szRealPath, cchRealPath + 1); 615 616 Assert(pb - (uint8_t *)pDir + cchRealPath + 1 <= cbAllocated); 616 pDir->fDataUnread = false;617 617 pDir->pszName = NULL; 618 618 pDir->cchName = 0; 619 pDir->fFlags = fFlags; 620 pDir->fDataUnread = false; 619 621 620 622 /* … … 643 645 * Take common cause with RTDirOpenFiltered(). 644 646 */ 645 int rc = rtDirOpenCommon(ppDir, pszPath, NULL, RTDIRFILTER_NONE);647 int rc = rtDirOpenCommon(ppDir, pszPath, NULL, RTDIRFILTER_NONE, 0 /*fFlags*/); 646 648 LogFlow(("RTDirOpen(%p:{%p}, %p:{%s}): return %Rrc\n", ppDir, *ppDir, pszPath, pszPath, rc)); 647 649 return rc; … … 649 651 650 652 651 RTDECL(int) RTDirOpenFiltered(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER enmFilter, uint32_t f Open)653 RTDECL(int) RTDirOpenFiltered(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER enmFilter, uint32_t fFlags) 652 654 { 653 655 /* … … 656 658 AssertMsgReturn(VALID_PTR(ppDir), ("%p\n", ppDir), VERR_INVALID_POINTER); 657 659 AssertMsgReturn(VALID_PTR(pszPath), ("%p\n", pszPath), VERR_INVALID_POINTER); 658 AssertReturn(!(f Open & ~RTDIROPEN_FLAGS_NO_SYMLINKS), VERR_INVALID_FLAGS);660 AssertReturn(!(fFlags & ~RTDIR_F_VALID_MASK), VERR_INVALID_FLAGS); 659 661 switch (enmFilter) 660 662 { … … 687 689 * and initialize the handle, and finally call the backend. 688 690 */ 689 int rc = rtDirOpenCommon(ppDir, pszPath, pszFilter, enmFilter );690 691 LogFlow(("RTDirOpenFiltered(%p:{%p}, %p:{%s}, %d ): return %Rrc\n",692 ppDir, *ppDir, pszPath, pszPath, enmFilter, rc));691 int rc = rtDirOpenCommon(ppDir, pszPath, pszFilter, enmFilter, fFlags); 692 693 LogFlow(("RTDirOpenFiltered(%p:{%p}, %p:{%s}, %d, %#x): return %Rrc\n", 694 ppDir, *ppDir, pszPath, pszPath, enmFilter, fFlags, rc)); 693 695 return rc; 696 } 697 698 699 RTDECL(bool) RTDirIsValid(PRTDIR hDir) 700 { 701 return RT_VALID_PTR(hDir) 702 && hDir->u32Magic == RTDIR_MAGIC; 694 703 } 695 704
Note:
See TracChangeset
for help on using the changeset viewer.