Changeset 69826 in vbox for trunk/src/VBox/Runtime/common/vfs/vfsstddir.cpp
- Timestamp:
- Nov 24, 2017 3:50:00 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/vfs/vfsstddir.cpp
r69818 r69826 255 255 */ 256 256 static DECLCALLBACK(int) rtVfsStdDir_Open(void *pvThis, const char *pszEntry, uint64_t fFileOpen, 257 uint32_t f VfsFlags, PRTVFSOBJ phVfsObj)257 uint32_t fObjFlags, PRTVFSOBJ phVfsObj) 258 258 { 259 259 PRTVFSSTDDIR pThis = (PRTVFSSTDDIR)pvThis; … … 270 270 { 271 271 case RTFS_TYPE_DIRECTORY: 272 if ( !(fVfsFlags & RTVFSOBJ_F_OPEN_DIRECTORY))272 if (fObjFlags & RTVFSOBJ_F_OPEN_DIRECTORY) 273 273 { 274 274 if ( (fFileOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_OPEN … … 277 277 { 278 278 RTDIR hSubDir; 279 rc = RTDirRelDirOpenFiltered(pThis->hDir, pszEntry, RTDIRFILTER_NONE, fVfsFlags, &hSubDir);279 rc = RTDirRelDirOpenFiltered(pThis->hDir, pszEntry, RTDIRFILTER_NONE, 0 /*fFlags*/, &hSubDir); 280 280 if (RT_SUCCESS(rc)) 281 281 { … … 307 307 { 308 308 case RTFS_TYPE_FILE: 309 rc = f VfsFlags & RTVFSOBJ_F_OPEN_FILE ? VINF_SUCCESS : VERR_IS_A_FILE;309 rc = fObjFlags & RTVFSOBJ_F_OPEN_FILE ? VINF_SUCCESS : VERR_IS_A_FILE; 310 310 break; 311 311 case RTFS_TYPE_DEV_BLOCK: 312 rc = f VfsFlags & RTVFSOBJ_F_OPEN_DEV_BLOCK ? VINF_SUCCESS : VERR_IS_A_BLOCK_DEVICE;312 rc = fObjFlags & RTVFSOBJ_F_OPEN_DEV_BLOCK ? VINF_SUCCESS : VERR_IS_A_BLOCK_DEVICE; 313 313 break; 314 314 case RTFS_TYPE_DEV_CHAR: 315 rc = f VfsFlags & RTVFSOBJ_F_OPEN_DEV_CHAR ? VINF_SUCCESS : VERR_IS_A_CHAR_DEVICE;315 rc = fObjFlags & RTVFSOBJ_F_OPEN_DEV_CHAR ? VINF_SUCCESS : VERR_IS_A_CHAR_DEVICE; 316 316 break; 317 317 /** @todo These two types should not result in files, but pure I/O streams. 318 318 * possibly char device too. */ 319 319 case RTFS_TYPE_FIFO: 320 rc = f VfsFlags & RTVFSOBJ_F_OPEN_FIFO ? VINF_SUCCESS : VERR_IS_A_FIFO;320 rc = fObjFlags & RTVFSOBJ_F_OPEN_FIFO ? VINF_SUCCESS : VERR_IS_A_FIFO; 321 321 break; 322 322 case RTFS_TYPE_SOCKET: 323 rc = f VfsFlags & RTVFSOBJ_F_OPEN_SOCKET ? VINF_SUCCESS : VERR_IS_A_SOCKET;323 rc = fObjFlags & RTVFSOBJ_F_OPEN_SOCKET ? VINF_SUCCESS : VERR_IS_A_SOCKET; 324 324 break; 325 325 default: … … 355 355 356 356 case RTFS_TYPE_SYMLINK: 357 if (f VfsFlags & RTVFSOBJ_F_OPEN_SYMLINK)357 if (fObjFlags & RTVFSOBJ_F_OPEN_SYMLINK) 358 358 { 359 359 uint32_t cRefs = RTVfsDirRetain(pThis->hSelf); … … 398 398 || (fFileOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_OPEN_CREATE 399 399 || (fFileOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_CREATE_REPLACE) 400 && (f VfsFlags & RTVFSOBJ_F_CREATE_MASK) != RTVFSOBJ_F_CREATE_NOTHING)400 && (fObjFlags & RTVFSOBJ_F_CREATE_MASK) != RTVFSOBJ_F_CREATE_NOTHING) 401 401 { 402 402 403 if ((f VfsFlags & RTVFSOBJ_F_CREATE_MASK) == RTVFSOBJ_F_CREATE_FILE)403 if ((fObjFlags & RTVFSOBJ_F_CREATE_MASK) == RTVFSOBJ_F_CREATE_FILE) 404 404 { 405 405 RTFILE hFile; … … 419 419 } 420 420 } 421 else if ((f VfsFlags & RTVFSOBJ_F_CREATE_MASK) == RTVFSOBJ_F_CREATE_DIRECTORY)421 else if ((fObjFlags & RTVFSOBJ_F_CREATE_MASK) == RTVFSOBJ_F_CREATE_DIRECTORY) 422 422 { 423 423 RTDIR hSubDir; 424 424 rc = RTDirRelDirCreate(pThis->hDir, pszEntry, (fFileOpen & RTFILE_O_CREATE_MODE_MASK) >> RTFILE_O_CREATE_MODE_SHIFT, 425 0 /* f VfsFlags */, &hSubDir);425 0 /* fFlags */, &hSubDir); 426 426 if (RT_SUCCESS(rc)) 427 427 { … … 449 449 450 450 /** 451 * @interface_method_impl{RTVFSDIROPS,pfnFollowAbsoluteSymlink} 452 */ 453 static DECLCALLBACK(int) rtVfsStdDir_FollowAbsoluteSymlink(void *pvThis, const char *pszRoot, PRTVFSDIR phVfsDir) 454 { 455 //PRTVFSSTDDIR pThis = (PRTVFSSTDDIR)pvThis; 456 RT_NOREF(pvThis); 457 /** @todo walking restriction. */ 458 return RTVfsDirOpenNormal(pszRoot, 0 /*fFlags*/, phVfsDir); 459 } 460 461 462 /** 451 463 * @interface_method_impl{RTVFSDIROPS,pfnOpenFile} 452 464 */ … … 668 680 }, 669 681 rtVfsStdDir_Open, 682 rtVfsStdDir_FollowAbsoluteSymlink, 670 683 rtVfsStdDir_OpenFile, 671 684 rtVfsStdDir_OpenDir,
Note:
See TracChangeset
for help on using the changeset viewer.