Added virtdisk-OpenVirtualDisk patchset

This commit is contained in:
Alistair Leslie-Hughes 2018-11-12 14:33:20 +11:00
parent 2d29324070
commit efd52500f7
3 changed files with 133 additions and 0 deletions

View File

@ -326,6 +326,7 @@ patch_enable_all ()
enable_uxtheme_GTK_Theming="$1"
enable_version_VerFindFileA="$1"
enable_version_VerQueryValue="$1"
enable_virtdisk_OpenVirtualDisk="$1"
enable_widl_SLTG_Typelib_Support="$1"
enable_windowscodecs_32bppPRGBA="$1"
enable_windowscodecs_GIF_Encoder="$1"
@ -1140,6 +1141,9 @@ patch_enable ()
version-VerQueryValue)
enable_version_VerQueryValue="$2"
;;
virtdisk-OpenVirtualDisk)
enable_virtdisk_OpenVirtualDisk="$2"
;;
widl-SLTG_Typelib_Support)
enable_widl_SLTG_Typelib_Support="$2"
;;
@ -6743,6 +6747,21 @@ if test "$enable_version_VerQueryValue" -eq 1; then
) >> "$patchlist"
fi
# Patchset virtdisk-OpenVirtualDisk
# |
# | This patchset fixes the following Wine bugs:
# | * [#45947] virtdisk: Stub OpenVirtualDisk
# |
# | Modified files:
# | * dlls/virtdisk/virtdisk.spec, dlls/virtdisk/virtdisk_main.c, include/virtdisk.h
# |
if test "$enable_virtdisk_OpenVirtualDisk" -eq 1; then
patch_apply virtdisk-OpenVirtualDisk/0001-virtdisk-Add-stub-for-OpenVirtualDisk.patch
(
printf '%s\n' '+ { "Louis Lenders", "virtdisk: Add stub for OpenVirtualDisk.", 1 },';
) >> "$patchlist"
fi
# Patchset windowscodecs-Palette_Images
# |
# | Modified files:

View File

@ -0,0 +1,113 @@
From 5ae0479976a8475b9bd9ed59c01a7bb204cf0bdc Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Date: Sun, 14 Oct 2018 10:30:20 +0200
Subject: [PATCH] virtdisk: Add stub for OpenVirtualDisk
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45947
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
---
dlls/virtdisk/virtdisk.spec | 2 +-
dlls/virtdisk/virtdisk_main.c | 7 +++++++
include/virtdisk.h | 44 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/dlls/virtdisk/virtdisk.spec b/dlls/virtdisk/virtdisk.spec
index 6bd5f14..f35b8df 100644
--- a/dlls/virtdisk/virtdisk.spec
+++ b/dlls/virtdisk/virtdisk.spec
@@ -15,7 +15,7 @@
@ stub GetVirtualDiskPhysicalPath
@ stub MergeVirtualDisk
@ stub MirrorVirtualDisk
-@ stub OpenVirtualDisk
+@ stdcall OpenVirtualDisk(ptr wstr long long ptr ptr)
@ stub ResizeVirtualDisk
@ stub SetVirtualDiskInformation
@ stub SetVirtualDiskMetadata
diff --git a/dlls/virtdisk/virtdisk_main.c b/dlls/virtdisk/virtdisk_main.c
index 3e6c5c1..1523fd4 100644
--- a/dlls/virtdisk/virtdisk_main.c
+++ b/dlls/virtdisk/virtdisk_main.c
@@ -65,3 +65,10 @@ DWORD WINAPI GetStorageDependencyInformation(HANDLE obj, GET_STORAGE_DEPENDENCY_
return ERROR_SUCCESS;
}
+
+DWORD WINAPI OpenVirtualDisk(VIRTUAL_STORAGE_TYPE *type, const WCHAR *path, VIRTUAL_DISK_ACCESS_MASK mask, OPEN_VIRTUAL_DISK_FLAG flags,
+ OPEN_VIRTUAL_DISK_PARAMETERS *param, HANDLE *handle)
+{
+ FIXME("(%p, %s, %d, 0x%x, %p, %p): stub\n", type, wine_dbgstr_w(path), mask, flags, param, handle);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
diff --git a/include/virtdisk.h b/include/virtdisk.h
index b4c07f3..7c207dd 100644
--- a/include/virtdisk.h
+++ b/include/virtdisk.h
@@ -37,6 +37,26 @@ typedef enum _ATTACH_VIRTUAL_DISK_FLAG {
ATTACH_VIRTUAL_DISK_FLAG_NO_SECURITY_DESCRIPTOR = 0x10
} ATTACH_VIRTUAL_DISK_FLAG;
+typedef enum _OPEN_VIRTUAL_DISK_FLAG {
+ OPEN_VIRTUAL_DISK_FLAG_NONE = 0x00,
+ OPEN_VIRTUAL_DISK_FLAG_NO_PARENTS = 0x01,
+ OPEN_VIRTUAL_DISK_FLAG_BLANK_FILE = 0x02,
+ OPEN_VIRTUAL_DISK_FLAG_BOOT_DRIVE = 0x04,
+ OPEN_VIRTUAL_DISK_FLAG_CACHED_IO = 0x08,
+ OPEN_VIRTUAL_DISK_FLAG_CUSTOM_DIFF_CHAIN = 0x10,
+ OPEN_VIRTUAL_DISK_FLAG_PARENT_CACHED_IO = 0x20,
+ OPEN_VIRTUAL_DISK_FLAG_VHDSET_FILE_ONLY = 0x40,
+ OPEN_VIRTUAL_DISK_FLAG_IGNORE_RELATIVE_PARENT_LOCATOR = 0x80,
+ OPEN_VIRTUAL_DISK_FLAG_NO_WRITE_HARDENING = 0x100
+} OPEN_VIRTUAL_DISK_FLAG;
+
+typedef enum _OPEN_VIRTUAL_DISK_VERSION {
+ OPEN_VIRTUAL_DISK_VERSION_UNSCPECIFIED,
+ OPEN_VIRTUAL_DISK_VERSION_1,
+ OPEN_VIRTUAL_DISK_VERSION_2,
+ OPEN_VIRTUAL_DISK_VERSION_3
+} OPEN_VIRTUAL_DISK_VERSION;
+
typedef enum _ATTACH_VIRTUAL_DISK_VERSION {
ATTACH_VIRTUAL_DISK_VERSION_UNSPECIFIED,
ATTACH_VIRTUAL_DISK_VERSION_1
@@ -156,6 +176,27 @@ typedef struct _EXPAND_VIRTUAL_DISK_PARAMETERS {
} DUMMYUNIONNAME;
} EXPAND_VIRTUAL_DISK_PARAMETERS, *PEXPAND_VIRTUAL_DISK_PARAMETERS;
+typedef struct _OPEN_VIRTUAL_DISK_PARAMETERS
+{
+ OPEN_VIRTUAL_DISK_VERSION Version;
+ __C89_NAMELESS union {
+ struct {
+ ULONG RWDepth;
+ } Version1;
+ struct {
+ BOOL GetInfoOnly;
+ BOOL ReadOnly;
+ GUID ResiliencyGuid;
+ } Version2;
+ struct {
+ BOOL GetInfoOnly;
+ BOOL ReadOnly;
+ GUID ResiliencyGuid;
+ GUID SnapshotId;
+ } Version3;
+ } DUMMYUNIONNAME;
+} OPEN_VIRTUAL_DISK_PARAMETERS, *POPEN_VIRTUAL_DISK_PARAMETERS;
+
typedef struct _STORAGE_DEPENDENCY_INFO_TYPE_1
{
DEPENDENT_DISK_FLAG DependencyTypeFlags;
@@ -196,6 +237,9 @@ typedef struct _VIRTUAL_DISK_PROGRESS {
DWORD WINAPI GetStorageDependencyInformation(HANDLE obj, GET_STORAGE_DEPENDENCY_FLAG flags, ULONG size, STORAGE_DEPENDENCY_INFO *info, ULONG *used);
+DWORD WINAPI OpenVirtualDisk(VIRTUAL_STORAGE_TYPE *type, const WCHAR *path, VIRTUAL_DISK_ACCESS_MASK mask, OPEN_VIRTUAL_DISK_FLAG flags,
+ OPEN_VIRTUAL_DISK_PARAMETERS *param, HANDLE *handle);
+
#ifdef __cplusplus
}
#endif
--
1.9.1

View File

@ -0,0 +1 @@
Fixes: [45947] virtdisk: Stub OpenVirtualDisk