return success;
}
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * FileCopyTree --
+ *
+ * Recursively copies all files from a source path to a destination,
+ * optionally overwriting any files. This does the actual work
+ * for File_CopyTree.
+ *
+ * Results:
+ * TRUE on success
+ * FALSE on failure: Error messages are appended.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static Bool
+FileCopyTree(ConstUnicode srcName, // IN:
+ ConstUnicode dstName, // IN:
+ Bool overwriteExisting, // IN:
+ Bool followSymlinks) // IN:
+{
+ int err;
+ Bool success = TRUE;
+ int numFiles;
+ int i;
+ Unicode *fileList = NULL;
+
+ numFiles = File_ListDirectory(srcName, &fileList);
+
+ if (numFiles == -1) {
+ err = Err_Errno();
+ Msg_Append(MSGID(File.CopyTree.walk.failure)
+ "Unable to access '%s' when copying files.\n\n",
+ UTF8(srcName));
+ Err_SetErrno(err);
+
+ return FALSE;
+ }
+
+ File_EnsureDirectory(dstName);
+
+ for (i = 0; i < numFiles && success; i++) {
+ struct stat sb;
+ Unicode name;
+ Unicode srcFilename;
+
+ name = Unicode_Alloc(fileList[i], STRING_ENCODING_DEFAULT);
+ srcFilename = File_PathJoin(srcName, name);
+
+ if (followSymlinks) {
+ success = (Posix_Stat(srcFilename, &sb) == 0);
+ } else {
+ success = (Posix_Lstat(srcFilename, &sb) == 0);
+ }
+
+ if (success) {
+ Unicode dstFilename = File_PathJoin(dstName, name);
+
+ switch (sb.st_mode & S_IFMT) {
+ case S_IFDIR:
+ success = FileCopyTree(srcFilename, dstFilename, overwriteExisting,
+ followSymlinks);
+ break;
+
+#if !defined(_WIN32)
+ case S_IFLNK:
+ if (Posix_Symlink(Posix_ReadLink(srcFilename), dstFilename) != 0) {
+ err = Err_Errno();
+ Msg_Append(MSGID(File.CopyTree.symlink.failure)
+ "Unable to symlink '%s' to '%s': %s\n\n",
+ UTF8(Posix_ReadLink(srcFilename)),
+ UTF8(dstFilename),
+ Err_Errno2String(err));
+ Err_SetErrno(err);
+ success = FALSE;
+ }
+ break;
+#endif
+
+ default:
+ if (!File_Copy(srcFilename, dstFilename, overwriteExisting)) {
+ err = Err_Errno();
+ Msg_Append(MSGID(File.CopyTree.copy.failure)
+ "Unable to copy '%s' to '%s': %s\n\n",
+ UTF8(srcFilename), UTF8(dstFilename),
+ Err_Errno2String(err));
+ Err_SetErrno(err);
+ success = FALSE;
+ }
+
+ break;
+ }
+
+ Unicode_Free(dstFilename);
+ } else {
+ err = Err_Errno();
+ Msg_Append(MSGID(File.CopyTree.stat.failure)
+ "Unable to get information on '%s' when copying files.\n\n",
+ UTF8(srcFilename));
+ Err_SetErrno(err);
+ }
+
+ Unicode_Free(srcFilename);
+ Unicode_Free(name);
+ }
+
+ for (i = 0; i < numFiles; i++) {
+ Unicode_Free(fileList[i]);
+ }
+
+ free(fileList);
+
+ return success;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * File_CopyTree --
+ *
+ * Recursively copies all files from a source path to a destination,
+ * optionally overwriting any files.
+ *
+ * Results:
+ * TRUE on success
+ * FALSE on failure: Error messages are appended.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+File_CopyTree(ConstUnicode srcName, // IN:
+ ConstUnicode dstName, // IN:
+ Bool overwriteExisting, // IN:
+ Bool followSymlinks) // IN:
+{
+ int err;
+
+ ASSERT(srcName);
+ ASSERT(dstName);
+
+ if (!File_IsDirectory(srcName)) {
+ err = Err_Errno();
+ Msg_Append(MSGID(File.CopyTree.source.notDirectory)
+ "The source path '%s' is not a directory.\n\n",
+ UTF8(srcName));
+ Err_SetErrno(err);
+ return FALSE;
+ }
+
+ if (!File_IsDirectory(dstName)) {
+ err = Err_Errno();
+ Msg_Append(MSGID(File.CopyTree.dest.notDirectory)
+ "The destination path '%s' is not a directory.\n\n",
+ UTF8(dstName));
+ Err_SetErrno(err);
+ return FALSE;
+ }
+
+ return FileCopyTree(srcName, dstName, overwriteExisting, followSymlinks);
+}
+
+
/*
*----------------------------------------------------------------------
*
# endif
# if defined(__FreeBSD__)
# include <sys/syslimits.h> // PATH_MAX
-# else
+# else
# include <limits.h> // PATH_MAX
-# endif
+# endif
#define FILE_MAXPATH PATH_MAX
#endif
int File_UnlinkNoFollow(ConstUnicode pathName);
void File_SplitName(ConstUnicode pathName,
- Unicode *volume,
- Unicode *dir,
+ Unicode *volume,
+ Unicode *dir,
Unicode *base);
-void File_GetPathName(ConstUnicode fullPath,
- Unicode *pathName,
+void File_GetPathName(ConstUnicode fullPath,
+ Unicode *pathName,
Unicode *base);
Unicode File_StripSlashes(ConstUnicode path);
const char **newPrefixes,
size_t numPrefixes);
-Bool File_CopyFromFdToFd(FileIODescriptor src,
+Bool File_CopyFromFdToFd(FileIODescriptor src,
FileIODescriptor dst);
-FileIOResult File_CreatePrompt(FileIODescriptor *file,
- ConstUnicode pathName,
- int access,
+FileIOResult File_CreatePrompt(FileIODescriptor *file,
+ ConstUnicode pathName,
+ int access,
int prompt);
-Bool File_CopyFromFd(FileIODescriptor src,
- ConstUnicode dstName,
+Bool File_CopyFromFd(FileIODescriptor src,
+ ConstUnicode dstName,
Bool overwriteExisting);
-Bool File_Copy(ConstUnicode srcName,
- ConstUnicode dstName,
+Bool File_Copy(ConstUnicode srcName,
+ ConstUnicode dstName,
Bool overwriteExisting);
-Bool File_CopyFromFdToName(FileIODescriptor src,
- ConstUnicode dstName,
+Bool File_CopyFromFdToName(FileIODescriptor src,
+ ConstUnicode dstName,
int dstDispose);
-Bool File_CopyFromNameToName(ConstUnicode srcName,
- ConstUnicode dstName,
+Bool File_CopyFromNameToName(ConstUnicode srcName,
+ ConstUnicode dstName,
int dstDispose);
-Bool File_Replace(ConstUnicode oldFile,
+Bool File_CopyTree(ConstUnicode srcName,
+ ConstUnicode dstName,
+ Bool overwriteExisting,
+ Bool followSymlinks);
+
+Bool File_Replace(ConstUnicode oldFile,
ConstUnicode newFile);
-Bool File_Move(ConstUnicode oldFile,
+Bool File_Move(ConstUnicode oldFile,
ConstUnicode newFile,
Bool *asRename);
/* file change notification module */
typedef void (*CbFunction)(void *clientData);
-typedef void (*NotifyCallback)(ConstUnicode pathName,
- int err,
+typedef void (*NotifyCallback)(ConstUnicode pathName,
+ int err,
void *data);
typedef void (*PollTimeout) (CbFunction f,
typedef void (*PollRemoveTimeout) (CbFunction f,
void *clientData);
-void File_PollInit(PollTimeout pt,
+void File_PollInit(PollTimeout pt,
PollRemoveTimeout prt);
void File_PollExit(void);
void File_PollImpersonateOnCheck(Bool check);
-Bool File_PollAddFile(ConstUnicode pathName,
- uint32 pollPeriod,
- NotifyCallback callback,
- void *data,
+Bool File_PollAddFile(ConstUnicode pathName,
+ uint32 pollPeriod,
+ NotifyCallback callback,
+ void *data,
Bool fPeriodic);
Bool File_PollAddDirFile(ConstUnicode pathName,
- uint32 pollPeriod,
+ uint32 pollPeriod,
NotifyCallback callback,
- void *data,
+ void *data,
Bool fPeriodic);
-Bool File_PollRemoveFile(ConstUnicode pathName,
+Bool File_PollRemoveFile(ConstUnicode pathName,
uint32 pollPeriod,
NotifyCallback callback);
* 'depth' is the color depth (in bits per pixel) used for the image. 'bpp'
* is the number of bits actually consumed per pixel in memory. (For
* example, an image that uses 5 bits for each of R, G, B has depth=15 and
- * bpp=16. It's always true that depth <= bpp.
+ * bpp=16. If an image has an alpha channel, the alpha bits are counted in
+ * 'bpp' but not in 'depth'.) It's always true that depth <= bpp.
*
* Also see the comment to Raster_ConvertPixels.
*/
/*
* VMRC ActiveX CLSIDs and ProgIDs
*/
-#define PRODUCT_VMRC_PLUGIN_GUID_EMBEDDED 0567856D-8D8E-43ad-9241-7772F392B3A3
-#define PRODUCT_VMRC_PLUGIN_GUID_TYPELIB AFAD9CB7-273F-4f59-8C78-D8AF13845222
+#define PRODUCT_VMRC_PLUGIN_GUID_EMBEDDED 291BA977-564B-4626-B868-A968FB8D4591
+#define PRODUCT_VMRC_PLUGIN_GUID_TYPELIB 70ABCAB7-6B45-4555-ABFC-8BC686E5ACFE
#define PRODUCT_VMRC_PLUGIN_PROGID_EMBEDDED_BASE "VMware.VMwareRemoteConsole"
#define PRODUCT_VMRC_PLUGIN_PROGID_EMBEDDED PRODUCT_VMRC_PLUGIN_PROGID_EMBEDDED_BASE "." \
XSTR(VMRC_PLUGIN_VERSION_BASE)
#endif
#define PRODUCT_VMRC_PLUGIN_CURRENT_MIMETYPE \
- "application/x-vmware-vmrc;version=" VMRC_PLUGIN_VERSION
-
-/*
- * previously shipped plugin mimetypes (updated as we ship them)
- *
- * XXX It is important that the mimetypes be listed in strictly decreasing
- * order by version. Server 2.0 Web Access (WBC) only checks the first VMRC
- * mimetype for compatibility, and others might make the same mistake in
- * the future.
- */
-#define PRODUCT_VMRC_PLUGIN_PREVIOUS_MIMETYPES \
- "application/x-vmware-vmrc;version=4.0.0.0"
+ "application/x-vmware-vmrc-2011"
/*
* legacy plugin mimetypes (currently unused but here for reference)
* NB: See above for constraints on the ordering of this list.
*/
#define PRODUCT_VMRC_PLUGIN_MIMETYPES \
- PRODUCT_VMRC_PLUGIN_CURRENT_MIMETYPE PRODUCT_VMRC_MIMETYPE_SEPARATOR \
- PRODUCT_VMRC_PLUGIN_PREVIOUS_MIMETYPES PRODUCT_VMRC_MIMETYPE_TERMINATOR
+ PRODUCT_VMRC_PLUGIN_CURRENT_MIMETYPE PRODUCT_VMRC_MIMETYPE_TERMINATOR
/*
* VMware USB Arbitration Service version definitions
#ifndef RC_INVOKED
typedef uint32 ToolsVersion;
-
+typedef struct {
+ uint8 major;
+ uint8 minor;
+ uint8 base;
+} ToolsVersionComponents;
+
+static INLINE void
+TOOLS_VERSION_UINT_TO_COMPONENTS(const ToolsVersion toolsVersion, // IN
+ ToolsVersionComponents *comps) // IN/OUT
+{
+ comps->major = (toolsVersion >> 10) & 0x1f; /* Keep lowest 5 bits after shift. */
+ comps->minor = (toolsVersion >> 5) & 0x1f;
+ comps->base = toolsVersion & 0x1f;
+}
#endif
/*
#define TOOLS_VERSION_UINT(MJR, MNR, BASE) (((MJR) << 10) + ((MNR) << 5) + (BASE))
+
/*
* Allocate 5 bits to each sub-version in the dotted tools version. This
* should take care of us for any reasonable usage: 32 x 32 x 32.
- * This macro takes the base variant appended with _V suffix and
+ * This macro takes the base variant appended with _V suffix and
* constructs the version number defines for the version.
* It then passes the version numbers into the UINT construct macro above.
*/
#define TOOLS_VERSION_TO_UINT(BASE_VARIANT_VER) \
- TOOLS_VERSION_UINT(BASE_VARIANT_VER##_MJR,BASE_VARIANT_VER##_MNR,BASE_VARIANT_VER##_BASE)
-
+ TOOLS_VERSION_UINT(BASE_VARIANT_VER##_MJR,BASE_VARIANT_VER##_MNR,BASE_VARIANT_VER##_BASE)
/*
#define TOOLS_VERSION_WS30 4
#define TOOLS_VERSION_WS31_BETA 5
-/*
+/*
* Versions:-
* For non-RC compiled variant:
* Define each version component pass to macro with BASENAME+SUFFIX (_V).
- * Where BASENAME describes the version and append
+ * Where BASENAME describes the version and append
* the appropriate suffix:_V
* For RC and non-RC define BASENAME_V and append _MJR or _MNR or _BASE.
* Set each version number accordingly.
#define USB_ARBITRATOR_VERSION_MAJOR 8
#define USB_ARBITRATOR_VERSION_MINOR 2
-#define USB_ARBITRATOR_VERSION_Z 6
+#define USB_ARBITRATOR_VERSION_Z 23
+
#define USB_ARBITRATOR_VERSION_BASE USB_ARBITRATOR_VERSION_MAJOR.\
USB_ARBITRATOR_VERSION_MINOR
* USB Arbitrator Component version. This version is used by the linux
* installer. See USB_ARBITRATOR_COMPONENT_VERSION_NUMBER in mk/defs-onetime.mk
*/
-#define USB_ARBITRATOR_COMPONENT_VERSION_NUMBER "8.2.6"
+#define USB_ARBITRATOR_COMPONENT_VERSION_NUMBER "8.2.23"
#ifdef VMX86_VPX
#define VIM_API_TYPE "VirtualCenter"
# define PRODUCT_LICENSE_VERSION "1.0"
# elif defined(VMX86_DESKTOP)
# if defined(__APPLE__)
-# define PRODUCT_LICENSE_VERSION "3.0"
+# define PRODUCT_LICENSE_VERSION "4.0+"
# else
# define PRODUCT_LICENSE_VERSION "8.0+"
# endif
"addr",
NULL);
}
-
if (!brokerAddr) {
+
/* We are executing in the simulator, so hardcode the brokerAddr. */
- brokerAddr = "tcp:host=127.0.0.1,port=5672,family=ipv4";
+ brokerAddr = "tcp:host=127.0.0.1,port=8672,family=ipv4";
}
mTransport = new DnDCPTransportVMCF(brokerAddr, NULL, false);
#else