. Fix crash in vmware-user: always provide valid data in clipboard data.
. Changes in shared code that don't affect open-vm-tools functionality.
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
*
* Check if the given file is on a VMFS supports such a file size
*
- * In the case of VMFS3/4, the largest supported file size is
+ * In the case of VMFS3, the largest supported file size is
* 256 * 1024 * B bytes
+ * VMFS5 supports larger file sizes.
*
* where B represents the blocksize in bytes
*
}
if (strcmp(fsType, "VMFS") == 0) {
- if (version >= 3) {
- /* Get ready for VMFS4 and perform sanity check on version */
- ASSERT(version == 3 || version == 4);
-
+ if (version == 3) {
maxFileSize = (VMFS3CONST * (uint64) blockSize * 1024);
+ } else {
+ /* Get ready for 64 TB on VMFS5 and perform sanity check on version */
+ ASSERT(version == 5);
+ maxFileSize = (uint64) 0x400000000000ULL;
}
if (fileSize <= maxFileSize && maxFileSize != -1) {
#ifdef __APPLE__
EXTERN char *Util_CFStringToUTF8CString(CFStringRef s);
-EXTERN char *Util_IORegGetStringProperty(io_object_t entry, CFStringRef property);
+EXTERN char *Util_IORegCopyStringProperty(io_object_t entry, CFStringRef property);
EXTERN Bool Util_IORegGetNumberProperty(io_object_t entry, CFStringRef property,
CFNumberType type, void *val);
EXTERN Bool Util_IORegGetBooleanProperty(io_object_t entry, CFStringRef property,
Bool *boolVal);
-EXTERN CFDataRef Util_IORegGetDataProperty(io_object_t entry, CFStringRef property);
+EXTERN CFDataRef Util_IORegCopyDataProperty(io_object_t entry, CFStringRef property);
EXTERN CFMutableDictionaryRef UtilMacos_CreateCFDictionary(
unsigned int numPairs, ...);
EXTERN io_service_t Util_IORegGetDeviceObjectByName(const char *deviceName);
#define PCI_DEVICE_ID_VMWARE_VMXNET3 0x07B0
#define PCI_DEVICE_ID_VMWARE_VMXWIFI 0x07B8
#define PCI_DEVICE_ID_VMWARE_PVSCSI 0x07C0
+#define PCI_DEVICE_ID_VMWARE_82574 0x07D0
/* The hypervisor device might grow. Please leave room
* for 7 more subfunctions.
#define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192 /* Used when no AGP support */
#define PCI_DEVICE_ID_INTEL_82545EM 0x100f
#define PCI_DEVICE_ID_INTEL_82546EB 0x1010
+#define PCI_DEVICE_ID_INTEL_82574 0x10d3
#define PCI_DEVICE_ID_INTEL_ICH7_16 0x27d8
#define PCI_DEVICE_ID_INTEL_HECI 0x2a74
VmTimeType curTime;
mBlockAdded = false;
+ sd.set(sd.get_target().c_str(), "");
+
curTime = GetCurrentTime();
/*
CopyPasteUI::LocalGetTextOrRTFRequestCB(Gtk::SelectionData& sd, // IN/OUT
guint info) // Ignored
{
+ sd.set(sd.get_target().c_str(), "");
+
if (!mCP.IsCopyPasteAllowed()) {
return;
}
if (refClipboard->wait_is_text_available()) {
Debug("%s: ask for text\n", __FUNCTION__);
Glib::ustring str = refClipboard->wait_for_text();
- bufSize = str.size();
+ bufSize = str.bytes();
if (bufSize > 0 &&
bufSize <= (int)CPCLIPITEM_MAX_SIZE_V3 &&
CPClipboard_SetItem(&mClipboard, CPFORMAT_TEXT,
utf::string pre;
utf::string post;
+ sd.set(sd.get_target().c_str(), "");
+
/* Provide URIs for each path in the guest's file list. */
if (FCP_TARGET_INFO_GNOME_COPIED_FILES == info) {
uriList = "copy\n";
targets.push_back(plainText);
targets.push_back(utf8Text);
targets.push_back(compountText);
- mHGTextData = utf::string((const char *)buf);
+ mHGTextData = utf::string((const char *)buf, STRING_ENCODING_UTF8);
mIsClipboardOwner = TRUE;
}
targets.push_back(appRtf);
targets.push_back(textRtf);
- mHGRTFData = utf::string((const char *)buf);
+ mHGRTFData = utf::string((const char *)buf, STRING_ENCODING_UTF8);
mIsClipboardOwner = TRUE;
}
const utf::string target = selection_data.get_target().c_str();
- Debug("%s: enter\n", __FUNCTION__);
+ selection_data.set(target.c_str(), "");
+
+ Debug("%s: enter with target %s\n", __FUNCTION__, target.c_str());
if (!m_inHGDrag) {
Debug("%s: not in drag, return\n", __FUNCTION__);