diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2023-02-20 11:01:13 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2023-02-20 11:01:13 +0000 |
commit | 6a757b758578c66079e8f4d7230766e2880dd6a4 (patch) | |
tree | b7d96cc127bb3bc475633b1b1671d570aacb93ff /src/VBox/Main/src-client | |
parent | 365844a6a23306e4a1de451d7d4970c96757530c (diff) | |
download | VirtualBox-svn-6a757b758578c66079e8f4d7230766e2880dd6a4.tar.gz |
Guest Control: Reduced #ifdefs. bugref:9783
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@98643 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Main/src-client')
-rw-r--r-- | src/VBox/Main/src-client/GuestDirectoryImpl.cpp | 27 | ||||
-rw-r--r-- | src/VBox/Main/src-client/GuestSessionImpl.cpp | 29 |
2 files changed, 6 insertions, 50 deletions
diff --git a/src/VBox/Main/src-client/GuestDirectoryImpl.cpp b/src/VBox/Main/src-client/GuestDirectoryImpl.cpp index 3d826639892..0e801f7bb30 100644 --- a/src/VBox/Main/src-client/GuestDirectoryImpl.cpp +++ b/src/VBox/Main/src-client/GuestDirectoryImpl.cpp @@ -268,17 +268,10 @@ int GuestDirectory::i_open(int *pvrcGuest) } } else - { #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ -#ifdef VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT + { vrc = i_openViaToolbox(pvrcGuest); -#else - RT_NOREF(pvrcGuest); - vrc = VERR_NOT_SUPPORTED; -#endif -#ifdef VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS } -#endif return vrc; } @@ -557,17 +550,10 @@ int GuestDirectory::i_close(int *pvrcGuest) vrc = VERR_NOT_IMPLEMENTED; } else - { #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ -#ifndef VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT - RT_NOREF(pvrcGuest); - vrc = VINF_SUCCESS; /* Nothing to do here. */ -#else + { vrc = i_closeViaToolbox(pvrcGuest); -#endif /* VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT */ -#ifdef VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS } -#endif AssertPtr(mSession); int vrc2 = mSession->i_directoryUnregister(this); @@ -613,17 +599,10 @@ int GuestDirectory::i_readInternal(GuestFsObjData &objData, int *pvrcGuest) vrc = 0; } else - { #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ -#ifndef VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT - RT_NOREF(objData); - vrc = VERR_NOT_SUPPORTED; -#else + { vrc = i_readInternalViaToolbox(objData, pvrcGuest); -#endif -#ifdef VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS } -#endif LogFlowThisFunc(("Returning vrc=%Rrc\n", vrc)); return vrc; diff --git a/src/VBox/Main/src-client/GuestSessionImpl.cpp b/src/VBox/Main/src-client/GuestSessionImpl.cpp index 0939aa52f99..d69e38b0911 100644 --- a/src/VBox/Main/src-client/GuestSessionImpl.cpp +++ b/src/VBox/Main/src-client/GuestSessionImpl.cpp @@ -989,7 +989,6 @@ int GuestSession::i_directoryCreate(const Utf8Str &strPath, uint32_t uMode, uint else #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ { -#ifdef VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT GuestProcessStartupInfo procInfo; procInfo.mFlags = ProcessCreateFlag_Hidden; procInfo.mExecutable = VBOXSERVICE_TOOL_MKDIR; @@ -1029,7 +1028,6 @@ int GuestSession::i_directoryCreate(const Utf8Str &strPath, uint32_t uMode, uint if (RT_SUCCESS(vrc)) vrc = GuestProcessToolbox::runTool(this, procInfo, pvrcGuest); -#endif /* VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT */ } LogFlowFunc(("LEAVE: %Rrc *pvrcGuest=%Rrc\n", vrc, pvrcGuest ? *pvrcGuest : -VERR_IPE_UNINITIALIZED_STATUS)); @@ -1260,9 +1258,8 @@ int GuestSession::i_fsCreateTemp(const Utf8Str &strTemplate, const Utf8Str &strP } } else - { #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ -#ifdef VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT + { GuestProcessStartupInfo procInfo; procInfo.mFlags = ProcessCreateFlag_WaitForStdOut; try @@ -1325,13 +1322,7 @@ int GuestSession::i_fsCreateTemp(const Utf8Str &strTemplate, const Utf8Str &strP } else if (pvrcGuest) *pvrcGuest = vrcGuest; -#else - RT_NOREF(strName); - vrc = VERR_NOT_SUPPORTED; -#endif /* VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT */ -#ifdef VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS } -#endif LogFlowThisFunc(("Returning vrc=%Rrc, vrcGuest=%Rrc\n", vrc, vrcGuest)); return vrc; @@ -1711,9 +1702,8 @@ int GuestSession::i_fileRemove(const Utf8Str &strPath, int *pvrcGuest) } } else - { #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ -#ifdef VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT + { GuestProcessStartupInfo procInfo; GuestToolboxStream streamOut; @@ -1753,13 +1743,7 @@ int GuestSession::i_fileRemove(const Utf8Str &strPath, int *pvrcGuest) } else if (pvrcGuest) *pvrcGuest = vrcGuest; -#else - RT_NOREF(pvrcGuest); - vrc = VERR_NOT_SUPPORTED; -#endif /* VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT */ -#ifdef VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS } -#endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ LogFlowThisFunc(("Returning vrc=%Rrc, vrcGuest=%Rrc\n", vrc, vrcGuest)); return vrc; @@ -2031,9 +2015,8 @@ int GuestSession::i_fsQueryInfo(const Utf8Str &strPath, bool fFollowSymlinks, Gu unregisterWaitEvent(pEvent); } else - { #endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ -#ifdef VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT + { /** @todo Merge this with IGuestFile::queryInfo(). */ GuestProcessStartupInfo procInfo; procInfo.mFlags = ProcessCreateFlag_WaitForStdOut; @@ -2073,13 +2056,7 @@ int GuestSession::i_fsQueryInfo(const Utf8Str &strPath, bool fFollowSymlinks, Gu } else if (pvrcGuest) *pvrcGuest = vrcGuest; -#else - RT_NOREF(fFollowSymlinks, objData, pvrcGuest); - vrc = VERR_NOT_SUPPORTED; -#endif /* VBOX_WITH_GSTCTL_TOOLBOX_SUPPORT */ -#ifdef VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS } -#endif /* VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS */ LogFlowThisFunc(("Returning vrc=%Rrc, vrcGuest=%Rrc\n", vrc, vrcGuest)); return vrc; |