From 5672a07b8dd9e8f98e1f436788addc68a2f32ccb Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 4 Oct 2017 03:28:28 +0200 Subject: [PATCH] Added patch to return CR_NO_SUCH_DEVNODE from CM_Get_Parent stub. --- patches/patchinstall.sh | 19 +++++++++++++ ...CR_NO_SUCH_DEVNODE-from-CM_Get_Paren.patch | 27 +++++++++++++++++++ patches/setupapi-CM_Get_Parent/definition | 1 + 3 files changed, 47 insertions(+) create mode 100644 patches/setupapi-CM_Get_Parent/0001-setupapi-Return-CR_NO_SUCH_DEVNODE-from-CM_Get_Paren.patch create mode 100644 patches/setupapi-CM_Get_Parent/definition diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index b7b0dfc6..75d60420 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -357,6 +357,7 @@ patch_enable_all () enable_server_open_mapping_file="$1" enable_server_send_hardware_message="$1" enable_server_shared_mapping="$1" + enable_setupapi_CM_Get_Parent="$1" enable_setupapi_DiskSpaceList="$1" enable_setupapi_Display_Device="$1" enable_setupapi_HSPFILEQ_Check_Type="$1" @@ -1357,6 +1358,9 @@ patch_enable () server-shared_mapping) enable_server_shared_mapping="$2" ;; + setupapi-CM_Get_Parent) + enable_setupapi_CM_Get_Parent="$2" + ;; setupapi-DiskSpaceList) enable_setupapi_DiskSpaceList="$2" ;; @@ -8058,6 +8062,21 @@ if test "$enable_server_shared_mapping" -eq 1; then ) >> "$patchlist" fi +# Patchset setupapi-CM_Get_Parent +# | +# | This patchset fixes the following Wine bugs: +# | * [#43831] Return CR_NO_SUCH_DEVNODE from CM_Get_Parent stub +# | +# | Modified files: +# | * dlls/setupapi/stubs.c +# | +if test "$enable_setupapi_CM_Get_Parent" -eq 1; then + patch_apply setupapi-CM_Get_Parent/0001-setupapi-Return-CR_NO_SUCH_DEVNODE-from-CM_Get_Paren.patch + ( + printf '%s\n' '+ { "Tim Wanders", "setupapi: Return CR_NO_SUCH_DEVNODE from CM_Get_Parent stub.", 1 },'; + ) >> "$patchlist" +fi + # Patchset setupapi-DiskSpaceList # | # | Modified files: diff --git a/patches/setupapi-CM_Get_Parent/0001-setupapi-Return-CR_NO_SUCH_DEVNODE-from-CM_Get_Paren.patch b/patches/setupapi-CM_Get_Parent/0001-setupapi-Return-CR_NO_SUCH_DEVNODE-from-CM_Get_Paren.patch new file mode 100644 index 00000000..84caacac --- /dev/null +++ b/patches/setupapi-CM_Get_Parent/0001-setupapi-Return-CR_NO_SUCH_DEVNODE-from-CM_Get_Paren.patch @@ -0,0 +1,27 @@ +From 2ea8a6a3b8e6d3ee42a6887587d49045b45677ca Mon Sep 17 00:00:00 2001 +From: Tim Wanders +Date: Wed, 4 Oct 2017 03:25:48 +0200 +Subject: setupapi: Return CR_NO_SUCH_DEVNODE from CM_Get_Parent stub. + +--- + dlls/setupapi/stubs.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c +index 54958434fb9..aafa0c131cf 100644 +--- a/dlls/setupapi/stubs.c ++++ b/dlls/setupapi/stubs.c +@@ -180,8 +180,8 @@ CONFIGRET WINAPI CM_Get_Device_ID_List_SizeW( PULONG pulLen, PCWSTR pszFilter, + DWORD WINAPI CM_Get_Parent(PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags) + { + FIXME("%p 0x%08x 0x%08x stub\n", pdnDevInst, dnDevInst, ulFlags); +- *pdnDevInst = dnDevInst; +- return CR_SUCCESS; ++ *pdnDevInst = 0; ++ return CR_NO_SUCH_DEVNODE; + } + + /*********************************************************************** +-- +2.14.1 + diff --git a/patches/setupapi-CM_Get_Parent/definition b/patches/setupapi-CM_Get_Parent/definition new file mode 100644 index 00000000..55c32324 --- /dev/null +++ b/patches/setupapi-CM_Get_Parent/definition @@ -0,0 +1 @@ +Fixes: [43831] Return CR_NO_SUCH_DEVNODE from CM_Get_Parent stub