Changeset 49948 in vbox
- Timestamp:
- Dec 17, 2013 9:51:45 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 91358
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r49504 r49948 150 150 * a certin VBoxService tool's guest stream block. */ 151 151 int FromLs(const GuestProcessStreamBlock &strmBlk); 152 int FromMkTemp(const GuestProcessStreamBlock &strmBlk); 152 153 int FromStat(const GuestProcessStreamBlock &strmBlk); 153 154 … … 285 286 size_t GetCount(void) const; 286 287 288 int GetRc(void) const; 289 287 290 const char* GetString(const char *pszKey) const; 288 291 -
trunk/src/VBox/Main/include/GuestSessionImpl.h
r49504 r49948 343 343 int directoryRemoveInternal(const Utf8Str &strPath, uint32_t uFlags, int *pGuestRc); 344 344 int directoryCreateInternal(const Utf8Str &strPath, uint32_t uMode, uint32_t uFlags, int *pGuestRc); 345 int objectCreateTempInternal(const Utf8Str &strTemplate, const Utf8Str &strPath, bool fDirectory, constUtf8Str &strName, int *pGuestRc);345 int objectCreateTempInternal(const Utf8Str &strTemplate, const Utf8Str &strPath, bool fDirectory, Utf8Str &strName, int *pGuestRc); 346 346 int directoryOpenInternal(const GuestDirectoryOpenInfo &openInfo, ComObjPtr<GuestDirectory> &pDirectory, int *pGuestRc); 347 347 int directoryQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc); -
trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
r49440 r49948 317 317 if (RT_FAILURE(rc)) throw rc; 318 318 /** @todo Add complete ls info! */ 319 } 320 catch (int rc2) 321 { 322 rc = rc2; 323 } 324 325 LogFlowFuncLeaveRC(rc); 326 return rc; 327 } 328 329 int GuestFsObjData::FromMkTemp(const GuestProcessStreamBlock &strmBlk) 330 { 331 LogFlowFunc(("\n")); 332 333 int rc; 334 335 try 336 { 337 #ifdef DEBUG 338 strmBlk.DumpToLog(); 339 #endif 340 /* Object name. */ 341 mName = strmBlk.GetString("name"); 342 if (mName.isEmpty()) throw VERR_NOT_FOUND; 343 /* Assign the stream block's rc. */ 344 rc = strmBlk.GetRc(); 319 345 } 320 346 catch (int rc2) … … 466 492 467 493 /** 494 * Gets the return code (name = "rc") of this stream block. 495 * 496 * @return IPRT status code. 497 */ 498 int GuestProcessStreamBlock::GetRc(void) const 499 { 500 const char *pszValue = GetString("rc"); 501 if (pszValue) 502 { 503 return RTStrToInt16(pszValue); 504 } 505 return VERR_NOT_FOUND; 506 } 507 508 /** 468 509 * Returns a string value of a specified key. 469 510 * -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r49632 r49948 866 866 867 867 int GuestSession::objectCreateTempInternal(const Utf8Str &strTemplate, const Utf8Str &strPath, 868 bool fDirectory, constUtf8Str &strName, int *pGuestRc)869 { 870 LogFlowThisFunc(("strTemplate=%s, strPath=%s, fDirectory=%RTbool , strName=%s\n",871 strTemplate.c_str(), strPath.c_str(), fDirectory , strName.c_str()));868 bool fDirectory, Utf8Str &strName, int *pGuestRc) 869 { 870 LogFlowThisFunc(("strTemplate=%s, strPath=%s, fDirectory=%RTbool\n", 871 strTemplate.c_str(), strPath.c_str(), fDirectory)); 872 872 873 873 int vrc = VINF_SUCCESS; … … 894 894 } 895 895 896 /** @todo Use an internal HGCM command for this operation, since 897 * we now can run in a user-dedicated session. */ 898 int guestRc; GuestCtrlStreamObjects stdOut; 896 899 if (RT_SUCCESS(vrc)) 897 vrc = GuestProcessTool::Run(this, procInfo, pGuestRc); 900 vrc = GuestProcessTool::RunEx(this, procInfo, 901 &stdOut, 1 /* cStrmOutObjects */, 902 &guestRc); 903 if ( RT_SUCCESS(vrc) 904 && RT_SUCCESS(guestRc)) 905 { 906 GuestFsObjData objData; 907 if (!stdOut.empty()) 908 { 909 vrc = objData.FromMkTemp(stdOut.at(0)); 910 if (RT_FAILURE(vrc)) 911 { 912 guestRc = vrc; 913 vrc = VERR_GSTCTL_GUEST_ERROR; 914 } 915 } 916 else 917 vrc = VERR_NO_DATA; 918 919 if (RT_SUCCESS(vrc)) 920 strName = objData.mName; 921 } 922 923 if (pGuestRc) 924 *pGuestRc = guestRc; 898 925 899 926 LogFlowFuncLeaveRC(vrc);
Note:
See TracChangeset
for help on using the changeset viewer.