summaryrefslogtreecommitdiffstats
path: root/src/VBox/Main/src-client
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Main/src-client')
-rw-r--r--src/VBox/Main/src-client/ConsoleImpl.cpp17
-rw-r--r--src/VBox/Main/src-client/ConsoleImpl2.cpp114
-rw-r--r--src/VBox/Main/src-client/GuestSessionImplTasks.cpp190
-rw-r--r--src/VBox/Main/src-client/RecordingStream.cpp10
4 files changed, 187 insertions, 144 deletions
diff --git a/src/VBox/Main/src-client/ConsoleImpl.cpp b/src/VBox/Main/src-client/ConsoleImpl.cpp
index 6d94eb1f..c28eda2a 100644
--- a/src/VBox/Main/src-client/ConsoleImpl.cpp
+++ b/src/VBox/Main/src-client/ConsoleImpl.cpp
@@ -7500,8 +7500,11 @@ int Console::i_recordingStart(util::AutoWriteLock *pAutoLock /* = NULL */)
/**
* Stops recording. Does nothing if recording is not active.
+ *
+ * Note: This does *not* disable recording for a VM, in other words,
+ * it does not change the VM's recording (enabled) setting.
*/
-int Console::i_recordingStop(util::AutoWriteLock *pAutoLock /* = NULL */)
+int Console::i_recordingStop(util::AutoWriteLock *)
{
if (!mRecording.mCtx.IsStarted())
return VINF_SUCCESS;
@@ -7514,18 +7517,6 @@ int Console::i_recordingStop(util::AutoWriteLock *pAutoLock /* = NULL */)
const size_t cStreams = mRecording.mCtx.GetStreamCount();
for (unsigned uScreen = 0; uScreen < cStreams; ++uScreen)
mDisplay->i_recordingScreenChanged(uScreen);
-
- if (pAutoLock)
- pAutoLock->release();
-
- ComPtr<IRecordingSettings> pRecordSettings;
- HRESULT hrc = mMachine->COMGETTER(RecordingSettings)(pRecordSettings.asOutParam());
- ComAssertComRC(hrc);
- hrc = pRecordSettings->COMSETTER(Enabled)(FALSE);
- ComAssertComRC(hrc);
-
- if (pAutoLock)
- pAutoLock->acquire();
}
LogFlowFuncLeaveRC(vrc);
diff --git a/src/VBox/Main/src-client/ConsoleImpl2.cpp b/src/VBox/Main/src-client/ConsoleImpl2.cpp
index 3576c493..cf57754d 100644
--- a/src/VBox/Main/src-client/ConsoleImpl2.cpp
+++ b/src/VBox/Main/src-client/ConsoleImpl2.cpp
@@ -145,6 +145,9 @@
# include "ExtPackManagerImpl.h"
#endif
+/** The TPM PPI MMIO base default (compatible with qemu). */
+#define TPM_PPI_MMIO_BASE_DEFAULT UINT64_C(0xfed45000)
+
/*********************************************************************************************************************************
* Internal Functions *
@@ -1928,6 +1931,58 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, PCVMMR3VTABLE pVMM, Au
N_("Invalid graphics controller type '%d'"), enmGraphicsController);
}
+#if defined(VBOX_WITH_TPM)
+ /*
+ * Configure the Trusted Platform Module.
+ */
+ ComObjPtr<ITrustedPlatformModule> ptrTpm;
+ TpmType_T enmTpmType = TpmType_None;
+
+ hrc = pMachine->COMGETTER(TrustedPlatformModule)(ptrTpm.asOutParam()); H();
+ hrc = ptrTpm->COMGETTER(Type)(&enmTpmType); H();
+ if (enmTpmType != TpmType_None)
+ {
+ InsertConfigNode(pDevices, "tpm", &pDev);
+ InsertConfigNode(pDev, "0", &pInst);
+ InsertConfigInteger(pInst, "Trusted", 1); /* boolean */
+ InsertConfigNode(pInst, "Config", &pCfg);
+ InsertConfigNode(pInst, "LUN#0", &pLunL0);
+
+ switch (enmTpmType)
+ {
+ case TpmType_v1_2:
+ case TpmType_v2_0:
+ InsertConfigString(pLunL0, "Driver", "TpmEmuTpms");
+ InsertConfigNode(pLunL0, "Config", &pCfg);
+ InsertConfigInteger(pCfg, "TpmVersion", enmTpmType == TpmType_v1_2 ? 1 : 2);
+ InsertConfigNode(pLunL0, "AttachedDriver", &pLunL1);
+ InsertConfigString(pLunL1, "Driver", "NvramStore");
+ break;
+ case TpmType_Host:
+#if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS)
+ InsertConfigString(pLunL0, "Driver", "TpmHost");
+ InsertConfigNode(pLunL0, "Config", &pCfg);
+#endif
+ break;
+ case TpmType_Swtpm:
+ hrc = ptrTpm->COMGETTER(Location)(bstr.asOutParam()); H();
+ InsertConfigString(pLunL0, "Driver", "TpmEmu");
+ InsertConfigNode(pLunL0, "Config", &pCfg);
+ InsertConfigString(pCfg, "Location", bstr);
+ break;
+ default:
+ AssertFailedBreak();
+ }
+
+ /* Add the device for the physical presence interface. */
+ InsertConfigNode( pDevices, "tpm-ppi", &pDev);
+ InsertConfigNode( pDev, "0", &pInst);
+ InsertConfigInteger(pInst, "Trusted", 1); /* boolean */
+ InsertConfigNode( pInst, "Config", &pCfg);
+ InsertConfigInteger(pCfg, "MmioBase", TPM_PPI_MMIO_BASE_DEFAULT);
+ }
+#endif
+
/*
* Firmware.
*/
@@ -2116,6 +2171,9 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, PCVMMR3VTABLE pVMM, Au
InsertConfigInteger(pCfg, "DmiExposeMemoryTable", 1);
}
+ if (enmTpmType != TpmType_None)
+ InsertConfigInteger(pCfg, "TpmPpiBase", TPM_PPI_MMIO_BASE_DEFAULT);
+
/* Attach the NVRAM storage driver. */
InsertConfigNode(pInst, "LUN#0", &pLunL0);
InsertConfigString(pLunL0, "Driver", "NvramStore");
@@ -3540,51 +3598,6 @@ int Console::i_configConstructorInner(PUVM pUVM, PVM pVM, PCVMMR3VTABLE pVMM, Au
}
#endif /* VBOX_WITH_DRAG_AND_DROP */
-#if defined(VBOX_WITH_TPM)
- /*
- * Configure the Trusted Platform Module.
- */
- ComObjPtr<ITrustedPlatformModule> ptrTpm;
- TpmType_T enmTpmType = TpmType_None;
-
- hrc = pMachine->COMGETTER(TrustedPlatformModule)(ptrTpm.asOutParam()); H();
- hrc = ptrTpm->COMGETTER(Type)(&enmTpmType); H();
- if (enmTpmType != TpmType_None)
- {
- InsertConfigNode(pDevices, "tpm", &pDev);
- InsertConfigNode(pDev, "0", &pInst);
- InsertConfigInteger(pInst, "Trusted", 1); /* boolean */
- InsertConfigNode(pInst, "Config", &pCfg);
- InsertConfigNode(pInst, "LUN#0", &pLunL0);
-
- switch (enmTpmType)
- {
- case TpmType_v1_2:
- case TpmType_v2_0:
- InsertConfigString(pLunL0, "Driver", "TpmEmuTpms");
- InsertConfigNode(pLunL0, "Config", &pCfg);
- InsertConfigInteger(pCfg, "TpmVersion", enmTpmType == TpmType_v1_2 ? 1 : 2);
- InsertConfigNode(pLunL0, "AttachedDriver", &pLunL1);
- InsertConfigString(pLunL1, "Driver", "NvramStore");
- break;
- case TpmType_Host:
-#if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS)
- InsertConfigString(pLunL0, "Driver", "TpmHost");
- InsertConfigNode(pLunL0, "Config", &pCfg);
-#endif
- break;
- case TpmType_Swtpm:
- hrc = ptrTpm->COMGETTER(Location)(bstr.asOutParam()); H();
- InsertConfigString(pLunL0, "Driver", "TpmEmu");
- InsertConfigNode(pLunL0, "Config", &pCfg);
- InsertConfigString(pCfg, "Location", bstr);
- break;
- default:
- AssertFailedBreak();
- }
- }
-#endif
-
/*
* ACPI
*/
@@ -6203,6 +6216,17 @@ int Console::i_configNetwork(const char *pszDevice,
close(iSock);
}
}
+# ifdef VBOXNETFLT_LINUX_NAMESPACE_SUPPORT
+ RTUUID IfaceUuid;
+ Bstr IfId;
+ hrc = hostInterface->COMGETTER(Id)(IfId.asOutParam()); H();
+ vrc = RTUuidFromUtf16(&IfaceUuid, IfId.raw());
+ AssertRCReturn(vrc, vrc);
+ char szTrunkNameWithNamespace[INTNET_MAX_TRUNK_NAME];
+ RTStrPrintf(szTrunkNameWithNamespace, sizeof(szTrunkNameWithNamespace), "%u/%s",
+ IfaceUuid.au32[0], pszTrunk);
+ pszTrunk = szTrunkNameWithNamespace;
+# endif
# else
# error "PORTME (VBOX_WITH_NETFLT)"
diff --git a/src/VBox/Main/src-client/GuestSessionImplTasks.cpp b/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
index 9a74e050..b8666f20 100644
--- a/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
+++ b/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
@@ -2571,7 +2571,7 @@ int GuestSessionTaskUpdateAdditions::copyFileToGuest(GuestSession *pSession, RTV
vrc = RTVfsFileQuerySize(hVfsFile, &cbSrcSize);
if (RT_SUCCESS(vrc))
{
- LogRel(("Copying Guest Additions installer file \"%s\" to \"%s\" on guest ...\n",
+ LogRel(("Guest Additions Update: Copying installer file \"%s\" to \"%s\" on guest ...\n",
strFileSrc.c_str(), strFileDst.c_str()));
GuestFileOpenInfo dstOpenInfo;
@@ -2588,13 +2588,14 @@ int GuestSessionTaskUpdateAdditions::copyFileToGuest(GuestSession *pSession, RTV
switch (vrc)
{
case VERR_GSTCTL_GUEST_ERROR:
- setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestFile::i_guestErrorToString(vrcGuest, strFileDst.c_str()));
+ setUpdateErrorMsg(VBOX_E_GSTCTL_GUEST_ERROR,
+ GuestFile::i_guestErrorToString(vrcGuest, strFileDst.c_str()));
break;
default:
- setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Guest file \"%s\" could not be opened: %Rrc"),
- strFileDst.c_str(), vrc));
+ setUpdateErrorMsg(VBOX_E_GSTCTL_GUEST_ERROR,
+ Utf8StrFmt(tr("Guest file \"%s\" could not be opened: %Rrc"),
+ strFileDst.c_str(), vrc));
break;
}
}
@@ -2617,6 +2618,34 @@ int GuestSessionTaskUpdateAdditions::copyFileToGuest(GuestSession *pSession, RTV
}
/**
+ * Sets an update error message to the current progress object + logs to release log.
+ *
+ * @returns Returns \a hrc for convenience.
+ * @param hrc Progress operation result to set.
+ * @param strMsg Message to set.
+ */
+HRESULT GuestSessionTaskUpdateAdditions::setUpdateErrorMsg(HRESULT hrc, const Utf8Str &strMsg)
+{
+ Utf8Str const strLog = "Guest Additions Update failed: " + strMsg;
+ LogRel(("%s\n", strLog.c_str()));
+ return GuestSessionTask::setProgressErrorMsg(hrc, strLog);
+}
+
+/**
+ * Sets an update error message to the current progress object + logs to release log.
+ *
+ * @returns Returns \a hrc for convenience.
+ * @param hrc Progress operation result to set.
+ * @param strMsg Message to set.
+ * @param guestErrorInfo Guest error info to use.
+ */
+HRESULT GuestSessionTaskUpdateAdditions::setUpdateErrorMsg(HRESULT hrc, const Utf8Str &strMsg, const GuestErrorInfo &guestErrorInfo)
+{
+ Utf8Str const strLog = strMsg + Utf8Str(": ") + GuestBase::getErrorAsString(guestErrorInfo);
+ return GuestSessionTaskUpdateAdditions::setProgressErrorMsg(hrc, strLog);
+}
+
+/**
* Helper function to run (start) a file on the guest.
*
* @returns VBox status code.
@@ -2628,7 +2657,7 @@ int GuestSessionTaskUpdateAdditions::runFileOnGuest(GuestSession *pSession, Gues
{
AssertPtrReturn(pSession, VERR_INVALID_POINTER);
- LogRel(("Running %s ...\n", procInfo.mName.c_str()));
+ LogRel(("Guest Additions Update: Running \"%s\" ...\n", procInfo.mName.c_str()));
GuestProcessTool procTool;
int vrcGuest = VERR_IPE_UNINITIALIZED_STATUS;
@@ -2647,26 +2676,26 @@ int GuestSessionTaskUpdateAdditions::runFileOnGuest(GuestSession *pSession, Gues
switch (vrc)
{
case VERR_GSTCTL_PROCESS_EXIT_CODE:
- setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Running update file \"%s\" on guest failed: %Rrc"),
- procInfo.mExecutable.c_str(), procTool.getRc()));
+ setUpdateErrorMsg(VBOX_E_GSTCTL_GUEST_ERROR,
+ Utf8StrFmt(tr("Running update file \"%s\" on guest failed: %Rrc"),
+ procInfo.mExecutable.c_str(), procTool.getRc()));
break;
case VERR_GSTCTL_GUEST_ERROR:
- setProgressErrorMsg(VBOX_E_IPRT_ERROR, tr("Running update file on guest failed"),
- GuestErrorInfo(GuestErrorInfo::Type_Process, vrcGuest, procInfo.mExecutable.c_str()));
+ setUpdateErrorMsg(VBOX_E_GSTCTL_GUEST_ERROR, tr("Running update file on guest failed"),
+ GuestErrorInfo(GuestErrorInfo::Type_Process, vrcGuest, procInfo.mExecutable.c_str()));
break;
case VERR_INVALID_STATE: /** @todo Special guest control vrc needed! */
- setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Update file \"%s\" reported invalid running state"),
- procInfo.mExecutable.c_str()));
+ setUpdateErrorMsg(VBOX_E_GSTCTL_GUEST_ERROR,
+ Utf8StrFmt(tr("Update file \"%s\" reported invalid running state"),
+ procInfo.mExecutable.c_str()));
break;
default:
- setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Error while running update file \"%s\" on guest: %Rrc"),
- procInfo.mExecutable.c_str(), vrc));
+ setUpdateErrorMsg(VBOX_E_GSTCTL_GUEST_ERROR,
+ Utf8StrFmt(tr("Error while running update file \"%s\" on guest: %Rrc"),
+ procInfo.mExecutable.c_str(), vrc));
break;
}
}
@@ -2708,16 +2737,14 @@ int GuestSessionTaskUpdateAdditions::checkGuestAdditionsStatus(GuestSession *pSe
vrc = runFileOnGuest(pSession, procInfo, true /* fSilent */);
if (RT_FAILURE(vrc))
- hrc = setProgressErrorMsg(VBOX_E_GSTCTL_GUEST_ERROR,
- Utf8StrFmt(tr("Automatic update of Guest Additions has failed: "
- "files were installed, but user services were not reloaded automatically. "
- "Please consider rebooting the guest")));
+ hrc = setUpdateErrorMsg(VBOX_E_GSTCTL_GUEST_ERROR,
+ Utf8StrFmt(tr("Files were installed, but user services were not reloaded automatically. "
+ "Please consider rebooting the guest")));
}
else
- hrc = setProgressErrorMsg(VBOX_E_GSTCTL_GUEST_ERROR,
- Utf8StrFmt(tr("Automatic update of Guest Additions has failed: "
- "files were installed, but kernel modules were not reloaded automatically. "
- "Please consider rebooting the guest")));
+ hrc = setUpdateErrorMsg(VBOX_E_GSTCTL_GUEST_ERROR,
+ Utf8StrFmt(tr("Files were installed, but kernel modules were not reloaded automatically. "
+ "Please consider rebooting the guest")));
}
return vrc;
@@ -2768,9 +2795,9 @@ int GuestSessionTaskUpdateAdditions::waitForGuestSession(ComObjPtr<Guest> pGuest
/* Make sure Guest Additions were reloaded on the guest side. */
vrc = checkGuestAdditionsStatus(pSession, osType);
if (RT_SUCCESS(vrc))
- LogRel(("Guest Additions were successfully reloaded after installation\n"));
+ LogRel(("Guest Additions Update: Guest Additions were successfully reloaded after installation\n"));
else
- LogRel(("Guest Additions were failed to reload after installation, please consider rebooting the guest\n"));
+ LogRel(("Guest Additions Update: Guest Additions were failed to reload after installation, please consider rebooting the guest\n"));
vrc = pSession->Close();
vrcRet = VINF_SUCCESS;
@@ -2805,7 +2832,7 @@ int GuestSessionTaskUpdateAdditions::Run(void)
HRESULT hrc = S_OK;
- LogRel(("Automatic update of Guest Additions started, using \"%s\"\n", mSource.c_str()));
+ LogRel(("Guest Additions Update: Automatic update started, using \"%s\"\n", mSource.c_str()));
ComObjPtr<Guest> pGuest(mSession->i_getParent());
#if 0
@@ -2829,8 +2856,8 @@ int GuestSessionTaskUpdateAdditions::Run(void)
if (FAILED(hrc)) vrc = VERR_TIMEOUT;
if (vrc == VERR_TIMEOUT)
- hrc = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
- Utf8StrFmt(tr("Guest Additions were not ready within time, giving up")));
+ hrc = setUpdateErrorMsg(VBOX_E_NOT_SUPPORTED,
+ Utf8StrFmt(tr("Guest Additions were not ready within time, giving up")));
#else
/*
* For use with the GUI we don't want to wait, just return so that the manual .ISO mounting
@@ -2842,11 +2869,11 @@ int GuestSessionTaskUpdateAdditions::Run(void)
&& addsRunLevel != AdditionsRunLevelType_Desktop))
{
if (addsRunLevel == AdditionsRunLevelType_System)
- hrc = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
- Utf8StrFmt(tr("Guest Additions are installed but not fully loaded yet, aborting automatic update")));
+ hrc = setUpdateErrorMsg(VBOX_E_NOT_SUPPORTED,
+ Utf8StrFmt(tr("Guest Additions are installed but not fully loaded yet, aborting automatic update")));
else
- hrc = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
- Utf8StrFmt(tr("Guest Additions not installed or ready, aborting automatic update")));
+ hrc = setUpdateErrorMsg(VBOX_E_NOT_SUPPORTED,
+ Utf8StrFmt(tr("Guest Additions not installed or ready, aborting automatic update")));
vrc = VERR_NOT_SUPPORTED;
}
#endif
@@ -2862,9 +2889,9 @@ int GuestSessionTaskUpdateAdditions::Run(void)
if ( RT_SUCCESS(vrc)
&& RTStrVersionCompare(strAddsVer.c_str(), "4.1") < 0)
{
- hrc = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
- Utf8StrFmt(tr("Guest has too old Guest Additions (%s) installed for automatic updating, please update manually"),
- strAddsVer.c_str()));
+ hrc = setUpdateErrorMsg(VBOX_E_NOT_SUPPORTED,
+ Utf8StrFmt(tr("Guest has too old Guest Additions (%s) installed for automatic updating, please update manually"),
+ strAddsVer.c_str()));
vrc = VERR_NOT_SUPPORTED;
}
}
@@ -2891,8 +2918,8 @@ int GuestSessionTaskUpdateAdditions::Run(void)
vrc = getGuestProperty(pGuest, "/VirtualBox/GuestInfo/OS/Release", strOSVer);
if (RT_FAILURE(vrc))
{
- hrc = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
- Utf8StrFmt(tr("Unable to detected guest OS version, please update manually")));
+ hrc = setUpdateErrorMsg(VBOX_E_NOT_SUPPORTED,
+ Utf8StrFmt(tr("Unable to detected guest OS version, please update manually")));
vrc = VERR_NOT_SUPPORTED;
}
@@ -2911,17 +2938,17 @@ int GuestSessionTaskUpdateAdditions::Run(void)
* (and the user has to deal with it in the guest). */
if (!(mFlags & AdditionsUpdateFlag_WaitForUpdateStartOnly))
{
- hrc = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
- Utf8StrFmt(tr("Windows 2000 and XP are not supported for automatic updating due to WHQL interaction, please update manually")));
+ hrc = setUpdateErrorMsg(VBOX_E_NOT_SUPPORTED,
+ Utf8StrFmt(tr("Windows 2000 and XP are not supported for automatic updating due to WHQL interaction, please update manually")));
vrc = VERR_NOT_SUPPORTED;
}
}
}
else
{
- hrc = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
- Utf8StrFmt(tr("%s (%s) not supported for automatic updating, please update manually"),
- strOSType.c_str(), strOSVer.c_str()));
+ hrc = setUpdateErrorMsg(VBOX_E_NOT_SUPPORTED,
+ Utf8StrFmt(tr("%s (%s) not supported for automatic updating, please update manually"),
+ strOSType.c_str(), strOSVer.c_str()));
vrc = VERR_NOT_SUPPORTED;
}
}
@@ -2937,9 +2964,9 @@ int GuestSessionTaskUpdateAdditions::Run(void)
&& osType != eOSType_Linux))
/** @todo Support Solaris. */
{
- hrc = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
- Utf8StrFmt(tr("Detected guest OS (%s) does not support automatic Guest Additions updating, please update manually"),
- strOSType.c_str()));
+ hrc = setUpdateErrorMsg(VBOX_E_NOT_SUPPORTED,
+ Utf8StrFmt(tr("Detected guest OS (%s) does not support automatic Guest Additions updating, please update manually"),
+ strOSType.c_str()));
vrc = VERR_NOT_SUPPORTED;
}
}
@@ -2954,9 +2981,9 @@ int GuestSessionTaskUpdateAdditions::Run(void)
vrc = RTVfsFileOpenNormal(mSource.c_str(), RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE, &hVfsFileIso);
if (RT_FAILURE(vrc))
{
- hrc = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Unable to open Guest Additions .ISO file \"%s\": %Rrc"),
- mSource.c_str(), vrc));
+ hrc = setUpdateErrorMsg(VBOX_E_IPRT_ERROR,
+ Utf8StrFmt(tr("Unable to open Guest Additions .ISO file \"%s\": %Rrc"),
+ mSource.c_str(), vrc));
}
else
{
@@ -2964,8 +2991,8 @@ int GuestSessionTaskUpdateAdditions::Run(void)
vrc = RTFsIso9660VolOpen(hVfsFileIso, 0 /*fFlags*/, &hVfsIso, NULL);
if (RT_FAILURE(vrc))
{
- hrc = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Unable to open file as ISO 9660 file system volume: %Rrc"), vrc));
+ hrc = setUpdateErrorMsg(VBOX_E_IPRT_ERROR,
+ Utf8StrFmt(tr("Unable to open file as ISO 9660 file system volume: %Rrc"), vrc));
}
else
{
@@ -2990,21 +3017,21 @@ int GuestSessionTaskUpdateAdditions::Run(void)
else
strUpdateDir.append("/");
- LogRel(("Guest Additions update directory is: %s\n", strUpdateDir.c_str()));
+ LogRel(("Guest Additions Update: Update directory is '%s'\n", strUpdateDir.c_str()));
}
else
{
switch (vrc)
{
case VERR_GSTCTL_GUEST_ERROR:
- hrc = setProgressErrorMsg(VBOX_E_IPRT_ERROR, tr("Creating update directory on guest failed"),
- GuestErrorInfo(GuestErrorInfo::Type_Directory, vrcGuest, strUpdateDir.c_str()));
+ hrc = setUpdateErrorMsg(VBOX_E_IPRT_ERROR, tr("Creating update directory on guest failed"),
+ GuestErrorInfo(GuestErrorInfo::Type_Directory, vrcGuest, strUpdateDir.c_str()));
break;
default:
- hrc = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Creating update directory \"%s\" on guest failed: %Rrc"),
- strUpdateDir.c_str(), vrc));
+ hrc = setUpdateErrorMsg(VBOX_E_IPRT_ERROR,
+ Utf8StrFmt(tr("Creating update directory \"%s\" on guest failed: %Rrc"),
+ strUpdateDir.c_str(), vrc));
break;
}
}
@@ -3028,10 +3055,10 @@ int GuestSessionTaskUpdateAdditions::Run(void)
if (RTStrVersionCompare(strOSVer.c_str(), "5.0") >= 0)
{
fInstallCert = true;
- LogRel(("Certificates for auto updating WHQL drivers will be installed\n"));
+ LogRel(("Guest Additions Update: Certificates for auto updating WHQL drivers will be installed\n"));
}
else
- LogRel(("Skipping installation of certificates for WHQL drivers\n"));
+ LogRel(("Guest Additions Update: Skipping installation of certificates for WHQL drivers\n"));
if (fInstallCert)
{
@@ -3176,7 +3203,7 @@ int GuestSessionTaskUpdateAdditions::Run(void)
uint8_t uOffset = 20; /* Start at 20%. */
uint8_t uStep = 40 / (uint8_t)mFiles.size(); Assert(mFiles.size() <= 10);
- LogRel(("Copying over Guest Additions update files to the guest ...\n"));
+ LogRel(("Guest Additions Update: Copying over update files to the guest ...\n"));
std::vector<ISOFile>::const_iterator itFiles = mFiles.begin();
while (itFiles != mFiles.end())
@@ -3189,9 +3216,9 @@ int GuestSessionTaskUpdateAdditions::Run(void)
vrc = copyFileToGuest(pSession, hVfsIso, itFiles->strSource, itFiles->strDest, fOptional);
if (RT_FAILURE(vrc))
{
- hrc = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Error while copying file \"%s\" to \"%s\" on the guest: %Rrc"),
- itFiles->strSource.c_str(), itFiles->strDest.c_str(), vrc));
+ hrc = setUpdateErrorMsg(VBOX_E_IPRT_ERROR,
+ Utf8StrFmt(tr("Error while copying file \"%s\" to \"%s\" on the guest: %Rrc"),
+ itFiles->strSource.c_str(), itFiles->strDest.c_str(), vrc));
break;
}
}
@@ -3215,7 +3242,7 @@ int GuestSessionTaskUpdateAdditions::Run(void)
uint8_t uOffset = 60; /* Start at 60%. */
uint8_t uStep = 35 / (uint8_t)mFiles.size(); Assert(mFiles.size() <= 10);
- LogRel(("Executing Guest Additions update files ...\n"));
+ LogRel(("Guest Additions Update: Executing update files ...\n"));
std::vector<ISOFile>::iterator itFiles = mFiles.begin();
while (itFiles != mFiles.end())
@@ -3247,27 +3274,26 @@ int GuestSessionTaskUpdateAdditions::Run(void)
{
if (pSession->i_isTerminated())
{
- LogRel(("Old guest session has terminated, waiting updated guest services to start\n"));
+ LogRel(("Guest Additions Update: Old guest session has terminated, waiting updated guest services to start\n"));
/* Wait for VBoxService to restart. */
vrc = waitForGuestSession(pSession->i_getParent(), osType);
if (RT_FAILURE(vrc))
- hrc = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Automatic update of Guest Additions has failed: "
- "guest services were not restarted, please reinstall Guest Additions manually")));
+ hrc = setUpdateErrorMsg(VBOX_E_IPRT_ERROR,
+ Utf8StrFmt(tr("Guest services were not restarted, please reinstall Guest Additions manually")));
}
else
{
vrc = VERR_TRY_AGAIN;
- hrc = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Old guest session is still active, guest services were not restarted "
- "after installation, please reinstall Guest Additions manually")));
+ hrc = setUpdateErrorMsg(VBOX_E_IPRT_ERROR,
+ Utf8StrFmt(tr("Old guest session is still active, guest services were not restarted "
+ "after installation, please reinstall Guest Additions manually")));
}
}
if (RT_SUCCESS(vrc))
{
- LogRel(("Automatic update of Guest Additions succeeded\n"));
+ LogRel(("Guest Additions Update: Automatic update succeeded\n"));
hrc = setProgressSuccess();
}
}
@@ -3281,17 +3307,17 @@ int GuestSessionTaskUpdateAdditions::Run(void)
{
if (vrc == VERR_CANCELLED)
{
- LogRel(("Automatic update of Guest Additions was canceled\n"));
+ LogRel(("Guest Additions Update: Automatic update was canceled\n"));
- hrc = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Installation was canceled")));
+ hrc = setUpdateErrorMsg(E_ABORT,
+ Utf8StrFmt(tr("Operation was canceled")));
}
else if (vrc == VERR_TIMEOUT)
{
- LogRel(("Automatic update of Guest Additions has timed out\n"));
+ LogRel(("Guest Additions Update: Automatic update has timed out\n"));
- hrc = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
- Utf8StrFmt(tr("Installation has timed out")));
+ hrc = setUpdateErrorMsg(E_FAIL,
+ Utf8StrFmt(tr("Operation has timed out")));
}
else
{
@@ -3313,11 +3339,11 @@ int GuestSessionTaskUpdateAdditions::Run(void)
}
}
- LogRel(("Automatic update of Guest Additions failed: %s (%Rhrc)\n",
- strError.c_str(), hrc));
+ LogRel(("Guest Additions Update: Automatic update failed: %s (vrc=%Rrc, hrc=%Rhrc)\n",
+ strError.c_str(), vrc, hrc));
}
- LogRel(("Please install Guest Additions manually\n"));
+ LogRel(("Guest Additions Update: An error has occurred (see above). Please install Guest Additions manually\n"));
}
/** @todo Clean up copied / left over installation files. */
diff --git a/src/VBox/Main/src-client/RecordingStream.cpp b/src/VBox/Main/src-client/RecordingStream.cpp
index dad3e5c5..63ddb86f 100644
--- a/src/VBox/Main/src-client/RecordingStream.cpp
+++ b/src/VBox/Main/src-client/RecordingStream.cpp
@@ -418,9 +418,9 @@ int RecordingStream::SendAudioFrame(const void *pvData, size_t cbData, uint64_t
/**
* Sends a raw (e.g. not yet encoded) video frame to the recording stream.
*
- * @returns VBox status code. Will return VINF_RECORDING_LIMIT_REACHED if the stream's recording
- * limit has been reached or VINF_RECORDING_THROTTLED if the frame is too early for the current
- * FPS setting.
+ * @returns VBox status code.
+ * @retval VINF_RECORDING_LIMIT_REACHED if the stream's recording limit has been reached.
+ * @retval VINF_RECORDING_THROTTLED if the frame is too early for the current FPS setting.
* @param x Upper left (X) coordinate where the video frame starts.
* @param y Upper left (Y) coordinate where the video frame starts.
* @param uPixelFormat Pixel format of the video frame.
@@ -435,7 +435,9 @@ int RecordingStream::SendVideoFrame(uint32_t x, uint32_t y, uint32_t uPixelForma
uint32_t uSrcWidth, uint32_t uSrcHeight, uint8_t *puSrcData, uint64_t msTimestamp)
{
AssertPtrReturn(m_pCtx, VERR_WRONG_ORDER);
- AssertReturn(NeedsUpdate(msTimestamp), VINF_RECORDING_THROTTLED); /* We ASSUME that the caller checked that first. */
+
+ if (RT_UNLIKELY(!NeedsUpdate(msTimestamp)))
+ return VINF_RECORDING_THROTTLED;
lock();