VBoxManageGuestCtrl.cpp revision 7f1968b754f2c734452aad469522b5c76f559129
/* $Id$ */
/** @file
* VBoxManage - Implementation of guestcontrol command.
*/
/*
* Copyright (C) 2010-2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "VBoxManage.h"
#ifndef VBOX_ONLY_DOCS
#include <map>
#include <vector>
#ifdef USE_XPCOM_QUEUE
# include <errno.h>
#endif
#include <signal.h>
#ifdef RT_OS_DARWIN
# include <CoreFoundation/CFRunLoop.h>
#endif
using namespace com;
/**
* IVirtualBoxCallback implementation for handling the GuestControlCallback in
* relation to the "guestcontrol * wait" command.
*/
/** @todo */
/** Set by the signal handler. */
static volatile bool g_fGuestCtrlCanceled = false;
/**
* An entry for a source element, including an optional filter.
*/
typedef struct SOURCEFILEENTRY
{
SOURCEFILEENTRY(const char *pszSource)
{
if ( !RTFileExists(pszSource)
&& !RTDirExists(pszSource))
{
/* No file and no directory -- maybe a filter? */
{
/* Yep, get the actual filter part. */
/* Remove the filter from actual sourcec directory name. */
}
}
}
/**
* An entry for an element which needs to be copied to the guest.
*/
typedef struct DESTFILEENTRY
{
/*
* Map for holding destination entires, whereas the key is the destination
* directory and the mapped value is a vector holding all elements for this directoy.
*/
/**
* Special exit codes for returning errors/information of a
* started guest process to the command line VBoxManage was started from.
* Useful for e.g. scripting.
*
* @note These are frozen as of 4.1.0.
*/
enum EXITCODEEXEC
{
/* Process exited normally but with an exit code <> 0. */
EXITCODEEXEC_CODE = 16,
EXITCODEEXEC_FAILED = 17,
EXITCODEEXEC_TERM_SIGNAL = 18,
EXITCODEEXEC_TERM_ABEND = 19,
EXITCODEEXEC_TIMEOUT = 20,
EXITCODEEXEC_DOWN = 21,
};
/**
* RTGetOpt-IDs for the guest execution control command line.
*/
enum GETOPTDEF_EXEC
{
};
enum GETOPTDEF_COPYFROM
{
GETOPTDEF_COPYFROM_DRYRUN = 1000,
};
enum GETOPTDEF_COPYTO
{
GETOPTDEF_COPYTO_DRYRUN = 1000,
};
enum OUTPUTTYPE
{
OUTPUTTYPE_UNDEFINED = 0,
OUTPUTTYPE_DOS2UNIX = 10,
OUTPUTTYPE_UNIX2DOS = 20
};
#endif /* VBOX_ONLY_DOCS */
{
"VBoxManage guestcontrol <vmname>|<uuid>\n"
" exec[ute]\n"
" --image <path to program>\n"
" --username <name> --password <password>\n"
" [--dos2unix]\n"
" [--environment \"<NAME>=<VALUE> [<NAME>=<VALUE>]\"]\n"
" [--timeout <msec>] [--unix2dos] [--verbose]\n"
" [--wait-exit] [--wait-stdout] [--wait-stdout]\n"
//" [--output-format=<dos>|<unix>]\n"
" [--output-type=<binary>|<text>]\n"
" [-- [<argument1>] ... [<argumentN>]\n"
/** @todo Add a "--" parameter (has to be last parameter) to directly execute
"\n"
" copyfrom\n"
" <source on guest> <destination on host>\n"
" --username <name> --password <password>\n"
" [--dryrun] [--follow] [--recursive] [--verbose]\n"
"\n"
" copyto|cp\n"
" <source on host> <destination on guest>\n"
" --username <name> --password <password>\n"
" [--dryrun] [--follow] [--recursive] [--verbose]\n"
"\n"
" createdir[ectory]|mkdir|md\n"
" <directory to create on guest>\n"
" --username <name> --password <password>\n"
" [--parents] [--mode <mode>] [--verbose]\n"
"\n"
" updateadditions\n"
" [--source <guest additions .ISO>] [--verbose]\n"
"\n");
}
#ifndef VBOX_ONLY_DOCS
/**
* Signal handler that sets g_fGuestCtrlCanceled.
*
* This can be executed on any thread in the process, on Windows it may even be
* a thread dedicated to delivering this signal. Do not doing anything
* unnecessary here.
*/
static void guestCtrlSignalHandler(int iSignal)
{
ASMAtomicWriteBool(&g_fGuestCtrlCanceled, true);
}
/**
* Installs a custom signal handler to get notified
* whenever the user wants to intercept the program.
*/
static void ctrlSignalHandlerInstall()
{
#ifdef SIGBREAK
#endif
}
/**
* Uninstalls a previously installed signal handler.
*/
static void ctrlSignalHandlerUninstall()
{
#ifdef SIGBREAK
#endif
}
/**
* Translates a process status to a human readable
* string.
*/
{
switch (enmStatus)
{
return "started";
return "successfully terminated";
return "terminated by signal";
return "abnormally aborted";
return "timed out";
return "timed out, hanging";
return "killed";
return "error";
default:
break;
}
return "unknown";
}
{
int rc = EXITCODEEXEC_SUCCESS;
switch (enmStatus)
{
break;
break;
break;
break;
break;
break;
* not exactly an error of the started process ... */
break;
break;
default:
break;
}
return rc;
}
{
if ( errorInfo.isFullAvailable()
|| errorInfo.isBasicAvailable())
{
/* If we got a VBOX_E_IPRT error we handle the error in a more gentle way
* because it contains more accurate info about what went wrong. */
else
{
RTMsgError("Error details:");
}
return VERR_GENERAL_FAILURE; /** @todo */
}
AssertMsgFailedReturn(("Object has indicated no error!?\n"),
}
{
return ctrlPrintError(ErrInfo);
}
{
int rc;
&& fCanceled)
{
rc = VERR_CANCELLED;
}
else
{
}
return rc;
}
/**
* Un-initializes the VM after guest control usage.
*/
{
}
/**
* Initializes the VM for IGuest operations.
*
* That is, checks whether it's up and running, if it can be locked (shared
* only) and returns a valid IGuest pointer on success.
*
* @return IPRT status code.
* @param pArg Our command line argument structure.
* @param pszNameOrId The VM's name or UUID.
* @param pGuest Where to return the IGuest interface pointer.
*/
{
/* Lookup VM. */
/* Assume it's an UUID. */
machine.asOutParam()));
return VERR_NOT_FOUND;
/* Machine is running? */
if (machineState != MachineState_Running)
{
RTMsgError("Machine \"%s\" is not running (currently %s)!\n",
return VERR_VM_INVALID_VM_STATE;
}
do
{
/* Open a session for the VM. */
/* Get the associated console. */
/* ... and session machine. */
/* Get IGuest interface. */
} while (0);
}
/* <Missing docuemntation> */
{
/*
* Parse arguments.
*/
if (pArg->argc < 2) /* At least the command we want to execute in the guest should be present :-). */
static const RTGETOPTDEF s_aOptions[] =
{
};
int ch;
uint32_t cMsTimeout = 0;
bool fOutputBinary = false;
bool fWaitForExit = false;
bool fWaitForStdOut = false;
bool fVerbose = false;
int vrc = VINF_SUCCESS;
&& RT_SUCCESS(vrc))
{
/* For options that require an argument, ValueUnion has received the value. */
switch (ch)
{
case GETOPTDEF_EXEC_DOS2UNIX:
if (eOutputType != OUTPUTTYPE_UNDEFINED)
break;
case 'e': /* Environment */
{
char **papszArg;
int cArgs;
if (RT_FAILURE(vrc))
for (int j = 0; j < cArgs; j++)
break;
}
break;
break;
case 'i':
break;
/** @todo Add a hidden flag. */
case 'p': /* Password */
break;
case 't': /* Timeout */
break;
case GETOPTDEF_EXEC_UNIX2DOS:
if (eOutputType != OUTPUTTYPE_UNDEFINED)
break;
case 'u': /* User name */
break;
case 'v': /* Verbose */
fVerbose = true;
break;
fWaitForExit = true;
break;
fWaitForExit = true;
fWaitForStdOut = true;
break;
break;
case VINF_GETOPT_NOT_OPTION:
{
else
break;
}
default:
}
}
if (Utf8UserName.isEmpty())
/*
* <missing comment indicating that we're done parsing args and started doing something else>
*/
if (fVerbose)
{
if (cMsTimeout == 0)
RTPrintf("Waiting for guest to start process ...\n");
else
}
/* Get current time stamp to later calculate rest of timeout left. */
/* Execute the process. */
int rcProc = RTEXITCODE_FAILURE;
&uPID,
progress.asOutParam());
if (fVerbose)
if (fWaitForExit)
{
if (fVerbose)
{
if (cMsTimeout) /* Wait with a certain timeout. */
{
/* Calculate timeout value left after process has been started. */
/* Is timeout still bigger than current difference? */
if (cMsTimeout > u64Elapsed)
else
}
else /* Wait forever. */
RTPrintf("Waiting for process to exit ...\n");
}
/* Setup signal handling if cancelable. */
bool fCanceledAlready = false;
fCancelable = FALSE;
if (fCancelable)
/* Wait for process to exit ... */
{
ULONG cbOutputData = 0;
/*
* Some data left to output?
*/
if (fOutputFlags || fWaitForStdOut)
{
/** @todo r=bird: The timeout argument is bogus in several
* ways:
* 1. RT_MAX will evaluate the arguments twice, which may
* result in different values because RTTimeMilliTS()
* returns a higher value the 2nd time. Worst case:
* Imagine when RT_MAX calculates the remaining time
* out (first expansion) there is say 60 ms left. Then
* we're preempted and rescheduled after, say, 120 ms.
* We call RTTimeMilliTS() again and ends up with a
* value -60 ms, which translate to a UINT32_MAX - 59
* ms timeout.
*
* 2. When the period expires, we will wait forever since
* both 0 and -1 mean indefinite timeout with this API,
* at least that's one way of reading the main code.
*
* RT_MAX expression. The left hand side is signed
* integer (0), the right side is unsigned 64-bit. From
* what I can tell, the compiler will treat this as
* unsigned 64-bit and never return 0.
*/
{
cbOutputData = 0;
}
else
{
if (cbOutputData > 0)
{
/** @todo r=bird: Use a VFS I/O stream filter for doing this, it's a
* generic problem and the new VFS APIs will handle it more
if (eOutputType != OUTPUTTYPE_UNDEFINED)
{
/*
* If aOutputData is text data from the guest process' stdout or stderr,
* it has a platform dependent line ending. So standardize on
*/
s++, d++)
{
if (*s == '\r')
{
/* skip over CR, adjust destination */
d--;
}
else if (s != d)
*d = *s;
}
}
else /* Just dump all data as we got it ... */
}
}
}
/* No more output data left? */
if (cbOutputData <= 0)
{
/* Only break out from process handling loop if we processed (displayed)
* all output data or if there simply never was output data and the process
* has been marked as complete. */
if (fCompleted)
break;
}
/* Process async cancelation */
if (g_fGuestCtrlCanceled && !fCanceledAlready)
{
else
g_fGuestCtrlCanceled = false;
}
/* Progress canceled by Main API? */
&& fCanceled)
break;
/* Did we run out of time? */
if ( cMsTimeout
{
break;
}
} /* while */
/* Undo signal handling */
if (fCancelable)
/* Report status back to the user. */
if (fCanceled)
{
if (fVerbose)
RTPrintf("Process execution canceled!\n");
}
else if ( fCompleted
{
else
{
RTPrintf("Exit code=%u (Status=%u [%s], Flags=%u)\n", uRetExitCode, retStatus, ctrlExecProcessStatusToText(retStatus), uRetFlags);
}
}
else
{
if (fVerbose)
RTPrintf("Process execution aborted!\n");
}
}
return RTEXITCODE_FAILURE;
return rcProc;
}
/** @todo Clean up too long parameter list -> move guest specific stuff into own struct etc! */
const char *pszUsername, const char *pszPassword,
const char *pszRootDir, const char *pszSubDir,
{
/* Sub directory is optional. */
/* Filter directory is optional. */
/*
* Construct current path.
*/
char szCurDir[RTPATH_MAX];
if (RT_SUCCESS(rc))
{
else
{
{
switch (enmType)
{
{
/* Skip "." and ".." entries. */
break;
if (fFlags & CopyFileFlag_Recursive)
{
if (pszSubDir)
else
if (pszNewSub)
{
}
else
rc = VERR_NO_MEMORY;
}
break;
}
if ( (fFlags & CopyFileFlag_Recursive)
&& (fFlags & CopyFileFlag_FollowLinks))
{
/* Fall through to next case is intentional. */
}
else
break;
case GuestDirEntryType_File:
{
if ( !pszFilter
{
*pcObjects += 1;
}
break;
}
default:
break;
}
}
}
}
return rc;
}
/**
* Reads a specified directory (recursively) based on the copy flags
* and appends all matching entries to the supplied list.
*
* @return IPRT status code.
* @param pszRootDir Directory to start with. Must end with
* a trailing slash and must be absolute.
* @param pszSubDir Sub directory part relative to the root
* directory; needed for recursion.
* @param pszFilter Search filter (e.g. *.pdf).
* @param pszDest Destination directory.
* @param fFlags Copy flags.
* @param pcObjects Where to store the overall objects to
* copy found.
* @param dirMap Reference to destination directory map to store found
* directories (primary key) + files (secondary key, vector).
*/
{
/* Sub directory is optional. */
/* Filter directory is optional. */
/*
* Construct current path.
*/
char szCurDir[RTPATH_MAX];
/*
* Open directory without a filter - RTDirOpenFiltered unfortunately
* cannot handle sub directories so we have to do the filtering ourselves.
*/
if (RT_SUCCESS(rc))
{
if (RT_FAILURE(rc))
}
if (RT_SUCCESS(rc))
{
/*
* Enumerate the directory tree.
*/
while (RT_SUCCESS(rc))
{
if (RT_FAILURE(rc))
{
if (rc == VERR_NO_MORE_FILES)
rc = VINF_SUCCESS;
break;
}
{
case RTDIRENTRYTYPE_DIRECTORY:
{
/* Skip "." and ".." entries. */
break;
if (fFlags & CopyFileFlag_Recursive)
{
if (pszSubDir)
else
if (pszNewSub)
{
}
else
rc = VERR_NO_MEMORY;
}
break;
}
case RTDIRENTRYTYPE_SYMLINK:
if ( (fFlags & CopyFileFlag_Recursive)
&& (fFlags & CopyFileFlag_FollowLinks))
{
/* Fall through to next case is intentional. */
}
else
break;
case RTDIRENTRYTYPE_FILE:
{
if ( !pszFilter
{
*pcObjects += 1;
}
break;
}
default:
break;
}
if (RT_FAILURE(rc))
break;
}
}
return rc;
}
/**
* Constructs a destinations map from a source entry and a destination root.
*
* @return IPRT status code.
* @param fHostToGuest
* @param sourceEntry Reference to a specified source entry to use.
* @param fFlags Copy file flags. Needed for recursive directory parsing.
* @param pszDestRoot Pointer to destination root. This can be used to add one or
* more directories to the actual destination path.
* @param mapDest Reference to the destination map for storing the actual result.
* @param pcObjects Pointer to a total object (file) count to copy.
*/
{
int rc = VINF_SUCCESS;
if ( RTPathFilename(pszSource)
&& RTFileExists(pszSource))
{
/* Source is a single file. */
*pcObjects++;
}
else
{
/* Source is either a directory or a filter (e.g. *.dll). */
NULL /* pszSubDir */,
}
return rc;
}
const char *pszUsername, const char *pszPassword,
{
int rc = VINF_SUCCESS;
else
{
if (fExists)
{
/* Source is a single file. */
*pcObjects++;
}
else
{
/* Source is either a directory or a filter (e.g. *.dll). */
}
}
return rc;
}
/**
* Determines the destination root for a specified source entry.
*
* @return IPRT status code.
* @param ppszDestRoot Receives pointer of allocated destination root. Must be
* free'd with ctrlCopyFreeDestinationRoot().
* @param sourceEntry Source entry to determine the destination root for.
* @param pszDest Original destination string to use.
*/
static int ctrlCopyAllocDestinationRoot(char **ppszDestRoot, SOURCEFILEENTRY &sourceEntry, const char *pszDest)
{
int rc = VINF_SUCCESS;
/*
* If a source filter is set (e.g. *.dll) use the original
* destination as our final root, because we want to copy all filtered
* files directly into the original root (and its sub directories if apply).
*/
char *pszDestRoot;
else
{
/*
* However, if no source filter is set we want to also copy the original
* source directory to our destination so that source "c:\foo", dest "c:\temp"
* becomes "c:\temp\foo".
*/
if (!iLen)
rc = VERR_NO_MEMORY;
}
if (RT_SUCCESS(rc))
return rc;
}
/**
* Frees a formerly allocated destination root.
*
* @param pszDestRoot Pointer to destination root to free.
*/
static void ctrlCopyFreeDestinationRoot(char *pszDestRoot)
{
}
/**
* Prepares the destination directory hirarchy on the guest side by creating the directories
* and sets the appropriate access rights.
*
* @return IPRT status code.
* @param pGuest IGuest interface pointer.
* @param fHostToGuest
* @param itDest Destination map iterator to process.
* @param pszDestRoot Destination root to use.
* @param pszUsername Username to use.
* @param pszPassword Password to use.
*/
const char *pszUsername, const char *pszPassword)
{
char *pszDestFinal = NULL;
int rc = VINF_SUCCESS;
/* Create root directory (= empty name) and skip the rest for
* this round. */
{
if (!pszDestFinal)
rc = VERR_NO_MEMORY;
}
else /* Create sub-directories, also empty ones. */
{
rc = VERR_NO_MEMORY;
}
{
if (fHostToGuest) /* We want to create directories on the guest. */
{
700, DirectoryCreateFlag_Parents);
}
else /* ... or on the host. */
{
}
}
return rc;
}
/**
* Copys a file from host to the guest.
*
* @return IPRT status code.
* @param pGuest IGuest interface pointer.
* @param pszSource Source path of existing host file to copy to the guest.
* @param pszDest Destination path on guest to copy the file to.
* @param pszUserName User name on guest to use for the copy operation.
* @param pszPassword Password of user account.
* @param fFlags Copy flags.
*/
const char *pszUserName, const char *pszPassword,
{
int vrc = VINF_SUCCESS;
else
{
}
return vrc;
}
/**
* Copys a file from guest to the host.
*
* @return IPRT status code.
* @param pGuest IGuest interface pointer.
* @param pszSource Source path of existing guest file to copy to the host.
* @param pszUserName User name on guest to use for the copy operation.
* @param pszPassword Password of user account.
* @param fFlags Copy flags.
*/
const char *pszUserName, const char *pszPassword,
{
int vrc = VINF_SUCCESS;
else
{
}
return vrc;
}
static int ctrlCopyToDestDirectory(IGuest *pGuest, bool fVerbose, bool fDryRun, bool fHostToGuest, DESTDIRMAPITER itDest, const char *pszDestRoot,
{
int rc = VINF_SUCCESS;
{
int iLen;
char *pszSource;
else
if (!iLen)
{
rc = VERR_NO_MEMORY;
break;
}
char *pszDest;
else
if (!iLen)
{
rc = VERR_NO_MEMORY;
break;
}
if (fVerbose)
/* Finally copy the desired file (if no dry run selected). */
if (!fDryRun)
{
if (fHostToGuest)
else
}
}
return rc;
}
bool fHostToGuest)
{
/** @todo r=bird: This command isn't very unix friendly in general. mkdir
* is much better (partly because it is much simpler of course). The main
* arguments against this is that (1) all but two options conflicts with
* done windows CMD style (though not in a 100% compatible way), and (3)
* that only one source is allowed - efficiently sabotaging default
* wildcard expansion by a unix shell. The best solution here would be
* two different variant, one windowsy (xcopy) and one unixy (gnu cp). */
/*
* IGuest::CopyToGuest is kept as simple as possible to let the developer choose
* what and how to implement the file enumeration/recursive lookup, like VBoxManage
* does in here.
*/
static const RTGETOPTDEF s_aOptions[] =
{
};
int ch;
bool fVerbose = false;
bool fCopyRecursive = false;
bool fDryRun = false;
int vrc = VINF_SUCCESS;
{
/* For options that require an argument, ValueUnion has received the value. */
switch (ch)
{
case GETOPTDEF_COPYTO_DRYRUN:
fDryRun = true;
break;
case GETOPTDEF_COPYTO_FOLLOW:
break;
break;
case 'R': /* Recursive processing */
break;
break;
break;
case 'v': /* Verbose */
fVerbose = true;
break;
case VINF_GETOPT_NOT_OPTION:
{
/* Last argument and no destination specified with
* --target-directory yet? Then use the current argument
* as destination. */
{
}
else
{
/* Save the source directory. */
}
break;
}
default:
}
}
if (!vecSources.size())
return errorSyntax(USAGE_GUESTCONTROL,
"No source(s) specified!");
return errorSyntax(USAGE_GUESTCONTROL,
"No destination specified!");
if (Utf8UserName.isEmpty())
return errorSyntax(USAGE_GUESTCONTROL,
"No user name specified!");
/*
* Done parsing arguments, do some more preparations.
*/
if (fVerbose)
{
if (fHostToGuest)
RTPrintf("Copying from host to guest ...\n");
else
RTPrintf("Copying from guest to host ...\n");
if (fDryRun)
RTPrintf("Dry run - no files copied!\n");
}
/* Strip traling slash from destination path. */
/*
* Here starts the actual fun!
*/
for (unsigned long s = 0; s < vecSources.size(); s++)
{
char *pszDestRoot;
if (RT_SUCCESS(vrc))
{
if (fHostToGuest)
else
if (RT_FAILURE(vrc))
{
if ( fVerbose
&& vrc == VERR_FILE_NOT_FOUND)
{
RTPrintf("Warning: Source \"%s\" does not exist, skipping!\n",
}
}
else
{
/*
* Prepare directory structure of each destination directory.
*/
{
if (!fDryRun)
if (RT_FAILURE(vrc))
break;
}
if (fVerbose)
{
if (!cObjects)
RTPrintf("Warning: Source \"%s\" has no (matching) files to copy, skipping!\n",
else
RTPrintf("Copying \"%s\" (%u files) ...\n",
}
/*
* Copy files of each destination root directory to the guest.
*/
{
{
else
RTPrintf("Copying directory \"%s\" (%u files) ...\n",
}
if (RT_FAILURE(vrc))
break;
}
}
}
}
}
{
/*
* Parse arguments.
*
* Note! No direct returns here, everyone must go thru the cleanup at the
* end of this function.
*/
static const RTGETOPTDEF s_aOptions[] =
{
};
int ch;
bool fVerbose = false;
&& rcExit == RTEXITCODE_SUCCESS)
{
/* For options that require an argument, ValueUnion has received the value. */
switch (ch)
{
case 'm': /* Mode */
break;
case 'P': /* Create parents */
break;
case 'p': /* Password */
break;
case 'u': /* User name */
break;
case 'v': /* Verbose */
fVerbose = true;
break;
case VINF_GETOPT_NOT_OPTION:
{
break;
}
default:
break;
}
}
if (rcExit == RTEXITCODE_SUCCESS)
{
/*
* Create the directories.
*/
{
if (fVerbose)
{
break;
}
it++;
}
}
return rcExit;
}
{
/*
* Check the syntax. We can deduce the correct syntax from the number of
* arguments.
*/
bool fVerbose = false;
static const RTGETOPTDEF s_aOptions[] =
{
};
int ch;
int vrc = VINF_SUCCESS;
&& RT_SUCCESS(vrc))
{
switch (ch)
{
case 's':
break;
case 'v':
fVerbose = true;
break;
default:
}
}
if (fVerbose)
RTPrintf("Updating Guest Additions ...\n");
#ifdef DEBUG_andy
if (Utf8Source.isEmpty())
Utf8Source = "c:\\Downloads\\VBoxGuestAdditions-r67158.iso";
#endif
/* Determine source if not set yet. */
if (Utf8Source.isEmpty())
{
char strTemp[RTPATH_MAX];
/* Check the standard image locations */
else
{
RTMsgError("Source could not be determined! Please use --source to specify a valid source.\n");
}
}
{
}
if (RT_SUCCESS(vrc))
{
if (fVerbose)
/* Wait for whole update process to complete. */
progress.asOutParam()));
else
{
else if (fVerbose)
RTPrintf("Guest Additions update successful.\n");
}
}
}
/**
* Access the guest control store.
*
* @returns program exit code.
* @note see the command line API description for parameters
*/
{
if (RT_SUCCESS(vrc))
{
int rcExit;
{
}
{
false /* Guest to host */);
}
{
true /* Host to guest */);
}
{
}
{
}
else
return rcExit;
}
return RTEXITCODE_FAILURE;
}
#endif /* !VBOX_ONLY_DOCS */