Changeset 83556 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 4, 2020 1:53:35 PM (5 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r83413 r83556 635 635 , mCreationMode(0) 636 636 , mfOpenEx(0) { } 637 638 /** 639 * Validates a file open info. 640 * 641 * @returns \c true if valid, \c false if not. 642 */ 643 bool IsValid(void) const 644 { 645 if (mfOpenEx) /** @todo Open flags not implemented yet. */ 646 return false; 647 648 switch (mOpenAction) 649 { 650 case FileOpenAction_OpenExisting: 651 break; 652 case FileOpenAction_OpenOrCreate: 653 break; 654 case FileOpenAction_CreateNew: 655 break; 656 case FileOpenAction_CreateOrReplace: 657 break; 658 case FileOpenAction_OpenExistingTruncated: 659 { 660 if ( mAccessMode == FileAccessMode_ReadOnly 661 || mAccessMode == FileAccessMode_AppendOnly 662 || mAccessMode == FileAccessMode_AppendRead) 663 return false; 664 break; 665 } 666 case FileOpenAction_AppendOrCreate: /* Deprecated, do not use. */ 667 break; 668 default: 669 AssertFailedReturn(false); 670 break; 671 } 672 673 return true; /** @todo Do we need more checks here? */ 674 } 637 675 638 676 /** The filename. */ -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r83552 r83556 1495 1495 1496 1496 /* Combine and validate flags. */ 1497 uint32_t fOpenEx = 0;1498 1497 for (size_t i = 0; i < aFlags.size(); i++) 1499 fOpenEx |= aFlags[i]; 1500 if (fOpenEx) 1501 return VERR_INVALID_PARAMETER; /* FileOpenExFlag not implemented yet. */ 1502 openInfo.mfOpenEx = fOpenEx; 1498 openInfo.mfOpenEx |= aFlags[i]; 1499 /* Validation is done in i_fileOpen(). */ 1503 1500 1504 1501 return i_fileOpen(openInfo, pFile, prcGuest); … … 1520 1517 return VERR_GSTCTL_GUEST_ERROR; 1521 1518 } 1519 1520 if (!openInfo.IsValid()) 1521 return VERR_INVALID_PARAMETER; 1522 1522 1523 1523 /* Create the directory object. */
Note:
See TracChangeset
for help on using the changeset viewer.