#ifndef _HGFS_H_
-#define _HGFS_H_
+# define _HGFS_H_
#define INCLUDE_ALLOW_USERLEVEL
#define INCLUDE_ALLOW_MODULE
#define INCLUDE_ALLOW_DISTRIBUTE
#include "includeCheck.h"
-#ifdef VMX86_TOOLS
-# include "rpcvmx.h"
-#else
-# include "config.h"
-#endif
#include "vm_assert.h"
/* Page size for HGFS packet (4K). */
* Maximum number of pages to transfer to/from the HGFS server for V3 protocol
* operations that support large requests/replies, e.g. reads and writes.
*/
-#define HGFS_LARGE_IO_MAX_PAGES 127
+#define HGFS_LARGE_IO_MAX_PAGES 15
/* Maximum number of bytes to read or write to a hgfs server in a single packet. */
#define HGFS_IO_MAX HGFS_PAGE_SIZE
*/
#define HGFS_LARGE_PACKET_MAX (HGFS_LARGE_IO_MAX + HGFS_HEADER_SIZE_MAX)
-/*
- * Legacy definitions for HGFS_LARGE_IO_MAX_PAGES, HGFS_LARGE_IO_MAX and
- * HGFS_LARGE_PACKET_MAX. They are used both in Windows client and hgFileCopy
- * library for performing vmrun CopyFileFromHostToGuest/GuestToHost.
- */
-#define HGFS_LEGACY_LARGE_IO_MAX_PAGES 15
-#define HGFS_LEGACY_LARGE_IO_MAX (HGFS_PAGE_SIZE * HGFS_LEGACY_LARGE_IO_MAX_PAGES)
-#define HGFS_LEGACY_LARGE_PACKET_MAX (HGFS_LEGACY_LARGE_IO_MAX + HGFS_HEADER_SIZE_MAX)
-
-static size_t gHgfsLargeIoMax = 0;
-static size_t gHgfsLargePacketMax = 0;
-
/*
*-----------------------------------------------------------------------------
*
static INLINE size_t HgfsLargeIoMax(Bool useLegacy) // IN
{
if (useLegacy) {
- return HGFS_LEGACY_LARGE_IO_MAX;
+ // TODO: Return the legacy value
}
- if (gHgfsLargeIoMax > 0) {
- return gHgfsLargeIoMax;
- }
-#ifdef VMX86_TOOLS
- if (!RpcVMX_ConfigGetBool(FALSE, "hgfs.packetSize.large")) {
-#else
- if (!Config_GetBool(FALSE, "hgfs.packetSize.large")) {
-#endif
- gHgfsLargeIoMax = HGFS_LEGACY_LARGE_IO_MAX;
- } else {
- gHgfsLargeIoMax = HGFS_LARGE_IO_MAX;
- }
- return gHgfsLargeIoMax;
+ return HGFS_LARGE_IO_MAX;
}
/*
static INLINE size_t HgfsLargePacketMax(Bool useLegacy) // IN
{
if (useLegacy) {
- return HGFS_LEGACY_LARGE_PACKET_MAX;
- }
- if (gHgfsLargePacketMax > 0) {
- return gHgfsLargePacketMax;
- }
-#ifdef VMX86_TOOLS
- if (!RpcVMX_ConfigGetBool(FALSE, "hgfs.packetSize.large")) {
-#else
- if (!Config_GetBool(FALSE, "hgfs.packetSize.large")) {
-#endif
- gHgfsLargePacketMax = HGFS_LEGACY_LARGE_PACKET_MAX;
- } else {
- gHgfsLargePacketMax = HGFS_LARGE_PACKET_MAX;
+ // TODO: Return the legacy value
}
- return gHgfsLargePacketMax;
+ return HGFS_LARGE_PACKET_MAX;
}
/*
/*********************************************************
- * Copyright (C) 2004-2018,2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2004-2018 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
*
*********************************************************/
-#if defined(__KERNEL__) || defined(_KERNEL) || defined(KERNEL)
-# include "kernelStubs.h"
-#else
-# include <stdio.h>
-# include <stdarg.h>
-# include <string.h>
-# include <stdlib.h>
-# include "str.h"
-#endif
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
#include "guest_msg_def.h"
#include "message.h"
#include "rpcout.h"
#include "rpcvmx.h"
+#include "str.h"
typedef struct {
* We have to dup the default, because of our contract: values we
* return must always be freed by the caller.
*/
-#if defined(__KERNEL__) || defined(_KERNEL) || defined(KERNEL)
-# ifdef __APPLE__
- value = STRDUP(defval, M_TEMP);
-# else
value = strdup(defval);
-# endif
-#else
- value = strdup(defval);
-#endif
}
}
#ifndef _VMHGFS_VERSION_H_
#define _VMHGFS_VERSION_H_
-#define VMHGFS_DRIVER_VERSION 1.6.11.0
-#define VMHGFS_DRIVER_VERSION_COMMAS 1,6,11,0
-#define VMHGFS_DRIVER_VERSION_STRING "1.6.11.0"
+#define VMHGFS_DRIVER_VERSION 1.6.10.0
+#define VMHGFS_DRIVER_VERSION_COMMAS 1,6,10,0
+#define VMHGFS_DRIVER_VERSION_STRING "1.6.10.0"
#endif /* _VMHGFS_VERSION_H_ */