Changeset 97456 in vbox for trunk/src/VBox/Main
- Timestamp:
- Nov 8, 2022 2:56:27 PM (2 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r97417 r97456 824 824 * @{ */ 825 825 int FromLs(const GuestProcessStreamBlock &strmBlk, bool fLong); 826 int FromRm(const GuestProcessStreamBlock &strmBlk); 826 827 int FromStat(const GuestProcessStreamBlock &strmBlk); 827 828 int FromMkTemp(const GuestProcessStreamBlock &strmBlk); -
trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
r97446 r97456 247 247 248 248 /** 249 * Parses stream block output data which came from the 'rm' (vbox_rm) 250 * VBoxService toolbox command. The result will be stored in this object. 251 * 252 * @returns VBox status code. 253 * @param strmBlk Stream block output data to parse. 254 */ 255 int GuestFsObjData::FromRm(const GuestProcessStreamBlock &strmBlk) 256 { 257 #ifdef DEBUG 258 strmBlk.DumpToLog(); 259 #endif 260 /* Object name. */ 261 mName = strmBlk.GetString("fname"); 262 263 /* Return the stream block's rc. */ 264 return strmBlk.GetRc(); 265 } 266 267 /** 249 268 * Parses stream block output data which came from the 'stat' (vbox_stat) 250 269 * VBoxService toolbox command. The result will be stored in this object. … … 405 424 * 406 425 * @return VBox status code. 426 * @retval VERR_NOT_FOUND if the return code string ("rc") was not found. 407 427 */ 408 428 int GuestProcessStreamBlock::GetRc(void) const … … 413 433 return RTStrToInt16(pszValue); 414 434 } 435 /** @todo We probably should have a dedicated error for that, VERR_GSTCTL_GUEST_TOOLBOX_whatever. */ 415 436 return VERR_NOT_FOUND; 416 437 } -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r97446 r97456 1586 1586 LogFlowThisFunc(("strPath=%s\n", strPath.c_str())); 1587 1587 1588 int vrc = VINF_SUCCESS;1589 1590 1588 GuestProcessStartupInfo procInfo; 1591 1589 GuestProcessStream streamOut; … … 1603 1601 catch (std::bad_alloc &) 1604 1602 { 1605 vrc = VERR_NO_MEMORY; 1606 } 1607 1608 if (RT_SUCCESS(vrc)) 1609 vrc = GuestProcessTool::run(this, procInfo, prcGuest); 1610 1611 LogFlowFuncLeaveRC(vrc); 1603 return VERR_NO_MEMORY; 1604 } 1605 1606 int vrcGuest = VERR_IPE_UNINITIALIZED_STATUS; 1607 GuestCtrlStreamObjects stdOut; 1608 int vrc = GuestProcessTool::runEx(this, procInfo, &stdOut, 1 /* cStrmOutObjects */, &vrcGuest); 1609 if (GuestProcess::i_isGuestError(vrc)) 1610 { 1611 if (!stdOut.empty()) 1612 { 1613 GuestFsObjData objData; 1614 vrc = objData.FromRm(stdOut.at(0)); 1615 if (RT_FAILURE(vrc)) 1616 { 1617 vrcGuest = vrc; 1618 if (prcGuest) 1619 *prcGuest = vrcGuest; 1620 vrc = VERR_GSTCTL_GUEST_ERROR; 1621 } 1622 } 1623 else 1624 vrc = VERR_BROKEN_PIPE; 1625 } 1626 else if (prcGuest) 1627 *prcGuest = vrcGuest; 1628 1629 LogFlowThisFunc(("Returning vrc=%Rrc, vrcGuest=%Rrc\n", vrc, vrcGuest)); 1612 1630 return vrc; 1613 1631 }
Note:
See TracChangeset
for help on using the changeset viewer.