Changeset 60642 in vbox
- Timestamp:
- Apr 22, 2016 8:02:20 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 106807
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r60622 r60642 2082 2082 2083 2083 /** 2084 * <Someone write documentation, pretty please!>2084 * Static helper function to start and wait for output of a certain toolbox tool. 2085 2085 * 2086 * @param pGuestRc Optional. Will be set to VINF_SUCCESS, 2087 * VERR_NOT_EQUAL or VERR_INVALID_STATE if the 2088 * process completed. Should it fail earlier that, 2089 * you're feel free to enlighten the rest of us... 2086 * This is the extended version, which addds the possibility of retrieving parsable so-called guest stream 2087 * objects. Those objects are issued on the guest side as part of VBoxService's toolbox tools (think of a BusyBox-like approach) 2088 * on stdout and can be used on the host side to retrieve more information about the actual command issued on the guest side. 2089 * 2090 * @return IPRT status code. 2091 * @param pGuestSession Guest control session to use for starting the toolbox tool in. 2092 * @param startupInfo Startup information about the toolbox tool. 2093 * @param pStrmOutObjects Pointer to stream objects array to use for retrieving the output of the toolbox tool. 2094 * Optional. 2095 * @param cStrmOutObjects Number of stream objects passed in. Optional. 2096 * @param errorInfo Error information returned for error handling. 2090 2097 */ 2091 2098 /* static */ 2092 2099 int GuestProcessTool::i_runExErrorInfo( GuestSession *pGuestSession, 2093 2100 const GuestProcessStartupInfo &startupInfo, 2094 GuestCtrlStreamObjects *p StrmOutObjects,2101 GuestCtrlStreamObjects *paStrmOutObjects, 2095 2102 uint32_t cStrmOutObjects, 2096 2103 GuestProcessToolErrorInfo &errorInfo) 2097 2104 { 2105 AssertPtrReturn(pGuestSession, VERR_INVALID_POINTER); 2106 /* paStrmOutObjects is optional. */ 2107 2108 /** @todo Check if this is a valid toolbox. */ 2109 2098 2110 GuestProcessTool procTool; 2099 2111 int vrc = procTool.Init(pGuestSession, startupInfo, false /* Async */, &errorInfo.guestRc); … … 2105 2117 { 2106 2118 GuestProcessStreamBlock strmBlk; 2107 vrc = procTool.i_waitEx( p StrmOutObjects2119 vrc = procTool.i_waitEx( paStrmOutObjects 2108 2120 ? GUESTPROCESSTOOL_FLAG_STDOUT_BLOCK 2109 2121 : GUESTPROCESSTOOL_FLAG_NONE, &strmBlk, &errorInfo.guestRc); 2110 if (p StrmOutObjects)2111 p StrmOutObjects->push_back(strmBlk);2122 if (paStrmOutObjects) 2123 paStrmOutObjects->push_back(strmBlk); 2112 2124 } 2113 2125 catch (std::bad_alloc)
Note:
See TracChangeset
for help on using the changeset viewer.