Changeset 107966 in vbox
- Timestamp:
- Jan 28, 2025 3:01:40 PM (3 weeks ago)
- svn:sync-xref-src-repo-rev:
- 167216
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestSessionImplTasks.h
r107186 r107966 457 457 int addProcessArguments(ProcessArguments &aArgumentsDest, const ProcessArguments &aArgumentsSource); 458 458 int copyFileToGuest(GuestSession *pSession, RTVFS hVfsIso, Utf8Str const &strFileSource, const Utf8Str &strFileDest, bool fOptional); 459 int runFileOnGuest(GuestSession *pSession, GuestProcessStartupInfo &procInfo, bool fSilent = false );459 int runFileOnGuest(GuestSession *pSession, GuestProcessStartupInfo &procInfo, bool fSilent = false, bool fOptional = false); 460 460 HRESULT setUpdateErrorMsg(HRESULT hrc, const Utf8Str &strMsg); 461 461 HRESULT setUpdateErrorMsg(HRESULT hrc, const Utf8Str &strMsg, const GuestErrorInfo &guestErrorInfo); -
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r107880 r107966 2717 2717 * @param pSession Guest session to use. 2718 2718 * @param procInfo Guest process startup info to use. 2719 * @param fSilent Whether to set progress into failure state in case of error. 2719 * @param fSilent Whether to set progress into failure state in case of error. Defaults to \c false. 2720 * Overrides \a fOptional. 2721 * @param fOptional Whether the file to run is optional, i.e. can be missing (also its path). 2722 * When set to \c false (non-optional), this will trigger an error if the file cannot be found. 2723 * Defaults to \c false. 2720 2724 */ 2721 int GuestSessionTaskUpdateAdditions::runFileOnGuest(GuestSession *pSession, GuestProcessStartupInfo &procInfo, bool fSilent) 2725 int GuestSessionTaskUpdateAdditions::runFileOnGuest(GuestSession *pSession, GuestProcessStartupInfo &procInfo, 2726 bool fSilent /* = false */, bool fOptional /* = false */) 2722 2727 { 2723 2728 AssertPtrReturn(pSession, VERR_INVALID_POINTER); … … 2772 2777 2773 2778 } 2779 2774 2780 case VERR_GSTCTL_GUEST_ERROR: 2781 { 2782 if ( ( vrcGuest == VERR_FILE_NOT_FOUND 2783 || vrcGuest == VERR_PATH_NOT_FOUND) 2784 && fOptional) 2785 { 2786 LogRel(("Guest Additions Update: File \"%s\" is absent, skipping\n", procInfo.mName.c_str())); 2787 vrc = VINF_SUCCESS; 2788 break; 2789 } 2790 2775 2791 setUpdateErrorMsg(VBOX_E_GSTCTL_GUEST_ERROR, tr("Running update file on guest failed"), 2776 2792 GuestErrorInfo(GuestErrorInfo::Type_Process, vrcGuest, cmdLine.c_str())); 2777 2793 break; 2794 } 2778 2795 2779 2796 case VERR_INVALID_STATE: /** @todo Special guest control vrc needed! */
Note:
See TracChangeset
for help on using the changeset viewer.