From 14f5eae731ddf879ee5b752abeba14048a2f9bbe Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 4 Mar 2017 23:19:16 +0100 Subject: [PATCH] Added patch to implement stub for virtdisk.GetStorageDependencyInformation. --- patches/patchinstall.sh | 21 +++ ...01-include-add-headerfile-virtdisk.h.patch | 128 ++++++++++++++++++ ...GetStorageDependencyInformation-stub.patch | 60 ++++++++ .../definition | 1 + 4 files changed, 210 insertions(+) create mode 100644 patches/virtdisk-GetStorageDependencyInformation/0001-include-add-headerfile-virtdisk.h.patch create mode 100644 patches/virtdisk-GetStorageDependencyInformation/0002-virtdisk-Add-GetStorageDependencyInformation-stub.patch create mode 100644 patches/virtdisk-GetStorageDependencyInformation/definition diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 2f0cd091..eaadd6b5 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -375,6 +375,7 @@ patch_enable_all () enable_version_GetFileVersionInfoSizeExW="$1" enable_version_VerFindFileA="$1" enable_version_VerQueryValue="$1" + enable_virtdisk_GetStorageDependencyInformation="$1" enable_vulkan_Vulkan_Implementation="$1" enable_wbemdisp_ISWbemSecurity="$1" enable_wbemprox_Printer="$1" @@ -1341,6 +1342,9 @@ patch_enable () version-VerQueryValue) enable_version_VerQueryValue="$2" ;; + virtdisk-GetStorageDependencyInformation) + enable_virtdisk_GetStorageDependencyInformation="$2" + ;; vulkan-Vulkan_Implementation) enable_vulkan_Vulkan_Implementation="$2" ;; @@ -7749,6 +7753,23 @@ if test "$enable_version_VerQueryValue" -eq 1; then ) >> "$patchlist" fi +# Patchset virtdisk-GetStorageDependencyInformation +# | +# | This patchset fixes the following Wine bugs: +# | * [#42577] Add stub for virtdisk.GetStorageDependencyInformation +# | +# | Modified files: +# | * dlls/virtdisk/virtdisk.spec, dlls/virtdisk/virtdisk_main.c, include/Makefile.in, include/virtdisk.h +# | +if test "$enable_virtdisk_GetStorageDependencyInformation" -eq 1; then + patch_apply virtdisk-GetStorageDependencyInformation/0001-include-add-headerfile-virtdisk.h.patch + patch_apply virtdisk-GetStorageDependencyInformation/0002-virtdisk-Add-GetStorageDependencyInformation-stub.patch + ( + printf '%s\n' '+ { "Louis Lenders", "include: Add headerfile virtdisk.h.", 1 },'; + printf '%s\n' '+ { "Michael Müller", "virtdisk: Add GetStorageDependencyInformation stub.", 1 },'; + ) >> "$patchlist" +fi + # Patchset vulkan-Vulkan_Implementation # | # | This patchset fixes the following Wine bugs: diff --git a/patches/virtdisk-GetStorageDependencyInformation/0001-include-add-headerfile-virtdisk.h.patch b/patches/virtdisk-GetStorageDependencyInformation/0001-include-add-headerfile-virtdisk.h.patch new file mode 100644 index 00000000..02f49f8b --- /dev/null +++ b/patches/virtdisk-GetStorageDependencyInformation/0001-include-add-headerfile-virtdisk.h.patch @@ -0,0 +1,128 @@ +From f0247232e35ba58178acd15924f64b681120d4c2 Mon Sep 17 00:00:00 2001 +From: Louis Lenders +Date: Fri, 3 Mar 2017 10:00:14 +0100 +Subject: include: add headerfile virtdisk.h + +Signed-off-by: Louis Lenders +--- + include/Makefile.in | 1 + + include/virtdisk.h | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 96 insertions(+) + create mode 100644 include/virtdisk.h + +diff --git a/include/Makefile.in b/include/Makefile.in +index 6393b286872..9c322758ff6 100644 +--- a/include/Makefile.in ++++ b/include/Makefile.in +@@ -633,6 +633,7 @@ HEADER_SRCS = \ + verrsrc.h \ + vfw.h \ + vfwmsgs.h \ ++ virtdisk.h \ + vsstyle.h \ + vssym32.h \ + vswriter.h \ +diff --git a/include/virtdisk.h b/include/virtdisk.h +new file mode 100644 +index 00000000000..3ed2c6ff217 +--- /dev/null ++++ b/include/virtdisk.h +@@ -0,0 +1,95 @@ ++/* ++ * Copyright 2017 Louis Lenders ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA ++ */ ++ ++#ifndef __WINE_VIRTDISK_DLL_H ++#define __WINE_VIRTDISK_DLL_H ++ ++#include "windef.h" ++#include "wine/debug.h" ++#include "winbase.h" ++#include "winnt.h" ++ ++typedef enum _GET_STORAGE_DEPENDENCY_FLAG ++{ ++ GET_STORAGE_DEPENDENCY_FLAG_NONE = 0x00000000, ++ GET_STORAGE_DEPENDENCY_FLAG_HOST_VOLUMES = 0x00000001, ++ GET_STORAGE_DEPENDENCY_FLAG_DISK_HANDLE = 0x00000002, ++} GET_STORAGE_DEPENDENCY_FLAG; ++ ++typedef enum _DEPENDENT_DISK_FLAG ++{ ++ DEPENDENT_DISK_FLAG_NONE = 0x00000000, ++ DEPENDENT_DISK_FLAG_MULT_BACKING_FILES = 0x00000001, ++ DEPENDENT_DISK_FLAG_FULLY_ALLOCATED = 0x00000002, ++ DEPENDENT_DISK_FLAG_READ_ONLY = 0x00000004, ++ DEPENDENT_DISK_FLAG_REMOTE = 0x00000008, ++ DEPENDENT_DISK_FLAG_SYSTEM_VOLUME = 0x00000010, ++ DEPENDENT_DISK_FLAG_SYSTEM_VOLUME_PARENT = 0x00000020, ++ DEPENDENT_DISK_FLAG_REMOVABLE = 0x00000040, ++ DEPENDENT_DISK_FLAG_NO_DRIVE_LETTER = 0x00000080, ++ DEPENDENT_DISK_FLAG_PARENT = 0x00000100, ++ DEPENDENT_DISK_FLAG_NO_HOST_DISK = 0x00000200, ++ DEPENDENT_DISK_FLAG_PERMANENT_LIFETIME = 0x00000400, ++} DEPENDENT_DISK_FLAG; ++ ++typedef enum _STORAGE_DEPENDENCY_INFO_VERSION ++{ ++ STORAGE_DEPENDENCY_INFO_VERSION_UNSPECIFIED = 0x0, ++ STORAGE_DEPENDENCY_INFO_VERSION_1 = 0x1, ++ STORAGE_DEPENDENCY_INFO_VERSION_2 = 0x2 ++} STORAGE_DEPENDENCY_INFO_VERSION; ++ ++typedef struct _VIRTUAL_STORAGE_TYPE ++{ ++ ULONG DeviceId; ++ GUID VendorId; ++} VIRTUAL_STORAGE_TYPE, *PVIRTUAL_STORAGE_TYPE; ++ ++typedef struct _STORAGE_DEPENDENCY_INFO_TYPE_1 ++{ ++ DEPENDENT_DISK_FLAG DependencyTypeFlags; ++ ULONG ProviderSpecificFlags; ++ VIRTUAL_STORAGE_TYPE VirtualStorageType; ++} STORAGE_DEPENDENCY_INFO_TYPE_1, *PSTORAGE_DEPENDENCY_INFO_TYPE_1; ++ ++typedef struct _STORAGE_DEPENDENCY_INFO_TYPE_2 ++{ ++ DEPENDENT_DISK_FLAG DependencyTypeFlags; ++ ULONG ProviderSpecificFlags; ++ VIRTUAL_STORAGE_TYPE VirtualStorageType; ++ ULONG AncestorLevel; ++ PWSTR DependencyDeviceName; ++ PWSTR HostVolumeName; ++ PWSTR DependentVolumeName; ++ PWSTR DependentVolumeRelativePath; ++} STORAGE_DEPENDENCY_INFO_TYPE_2, *PSTORAGE_DEPENDENCY_INFO_TYPE_2; ++ ++typedef struct _STORAGE_DEPENDENCY_INFO ++{ ++ STORAGE_DEPENDENCY_INFO_VERSION Version; ++ ULONG NumberEntries; ++ __C89_NAMELESS union ++ { ++ STORAGE_DEPENDENCY_INFO_TYPE_1 Version1Entries[1]; ++ STORAGE_DEPENDENCY_INFO_TYPE_2 Version2Entries[1]; ++ } __C89_NAMELESSUNIONNAME; ++} STORAGE_DEPENDENCY_INFO, *PSTORAGE_DEPENDENCY_INFO; ++ ++DWORD WINAPI GetStorageDependencyInformation(HANDLE obj, GET_STORAGE_DEPENDENCY_FLAG flags, ULONG size, STORAGE_DEPENDENCY_INFO *info, ULONG *used); ++ ++#endif /* __WINE_VIRTDISK_DLL_H */ +-- +2.11.0 + diff --git a/patches/virtdisk-GetStorageDependencyInformation/0002-virtdisk-Add-GetStorageDependencyInformation-stub.patch b/patches/virtdisk-GetStorageDependencyInformation/0002-virtdisk-Add-GetStorageDependencyInformation-stub.patch new file mode 100644 index 00000000..efce6573 --- /dev/null +++ b/patches/virtdisk-GetStorageDependencyInformation/0002-virtdisk-Add-GetStorageDependencyInformation-stub.patch @@ -0,0 +1,60 @@ +From 53c44bc9df1067be152aa39bf3824ae2f586d23b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Fri, 3 Mar 2017 14:23:53 +0100 +Subject: virtdisk: Add GetStorageDependencyInformation stub. + +--- + dlls/virtdisk/virtdisk.spec | 2 +- + dlls/virtdisk/virtdisk_main.c | 19 +++++++++++++++++++ + 2 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/dlls/virtdisk/virtdisk.spec b/dlls/virtdisk/virtdisk.spec +index 2946b66d501..6bd5f146dbd 100644 +--- a/dlls/virtdisk/virtdisk.spec ++++ b/dlls/virtdisk/virtdisk.spec +@@ -8,7 +8,7 @@ + @ stub EnumerateVirtualDiskMetadata + @ stub ExpandVirtualDisk + @ stub GetAllAttachedVirtualDiskPhysicalPaths +-@ stub GetStorageDependencyInformation ++@ stdcall GetStorageDependencyInformation(long long long ptr ptr) + @ stub GetVirtualDiskInformation + @ stub GetVirtualDiskMetadata + @ stub GetVirtualDiskOperationProgress +diff --git a/dlls/virtdisk/virtdisk_main.c b/dlls/virtdisk/virtdisk_main.c +index 0da0dca4611..aac356e7a4f 100644 +--- a/dlls/virtdisk/virtdisk_main.c ++++ b/dlls/virtdisk/virtdisk_main.c +@@ -22,6 +22,8 @@ + + #include "windef.h" + #include "winbase.h" ++#include "virtdisk.h" ++ + #include "wine/debug.h" + + WINE_DEFAULT_DEBUG_CHANNEL(virtdisk); +@@ -44,3 +46,20 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved) + + return TRUE; + } ++ ++DWORD WINAPI GetStorageDependencyInformation(HANDLE obj, GET_STORAGE_DEPENDENCY_FLAG flags, ULONG size, STORAGE_DEPENDENCY_INFO *info, ULONG *used) ++{ ++ FIXME("(%p, 0x%x, %u, %p, %p): stub\n", obj, flags, size, info, used); ++ ++ if (used) *used = sizeof(STORAGE_DEPENDENCY_INFO); ++ ++ if (!info || !size) ++ return ERROR_SUCCESS; ++ ++ if (size < sizeof(STORAGE_DEPENDENCY_INFO)) ++ return ERROR_INSUFFICIENT_BUFFER; ++ ++ info->NumberEntries = 0; ++ ++ return ERROR_SUCCESS; ++} +-- +2.11.0 + diff --git a/patches/virtdisk-GetStorageDependencyInformation/definition b/patches/virtdisk-GetStorageDependencyInformation/definition new file mode 100644 index 00000000..1bf5eaee --- /dev/null +++ b/patches/virtdisk-GetStorageDependencyInformation/definition @@ -0,0 +1 @@ +Fixes: [42577] Add stub for virtdisk.GetStorageDependencyInformation