winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
811 discussions
Start a n
N
ew thread
Zebediah Figura : l3codeca.acm: Remove the Mac OS AudioToolbox backend.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: d9ed4ee992b0b277dacf87d05cc0b69bcd06b90c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d9ed4ee992b0b277dacf87d0…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Jun 4 16:43:36 2021 -0500 l3codeca.acm: Remove the Mac OS AudioToolbox backend. libmpg123 is readily available in Mac OS package managers. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 +- configure.ac | 2 +- dlls/l3codeca.acm/Makefile.in | 2 +- dlls/l3codeca.acm/mpegl3.c | 390 +----------------------------------------- 4 files changed, 4 insertions(+), 392 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=d9ed4ee992b0b277dacf…
1
0
0
0
Alexandre Julliard : ntdll: Create a thread to run the ctrl-C routine instead of raising an exception.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: 1bd447348402ce1b648ac48b9812a698f15df0c1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1bd447348402ce1b648ac48b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 9 15:19:43 2021 +0200 ntdll: Create a thread to run the ctrl-C routine instead of raising an exception. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/console.c | 16 ---------------- dlls/ntdll/loader.c | 15 +++++++++++++++ dlls/ntdll/ntdll.spec | 1 + dlls/ntdll/unix/loader.c | 2 ++ dlls/ntdll/unix/signal_arm.c | 7 +++++-- dlls/ntdll/unix/signal_arm64.c | 7 +++++-- dlls/ntdll/unix/signal_i386.c | 9 +++++++-- dlls/ntdll/unix/signal_x86_64.c | 7 +++++-- dlls/ntdll/unix/unix_private.h | 1 + programs/conhost/conhost.c | 10 ---------- 10 files changed, 41 insertions(+), 34 deletions(-) diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c index 6a3bfdeba65..c38e8e91955 100644 --- a/dlls/kernelbase/console.c +++ b/dlls/kernelbase/console.c @@ -470,20 +470,6 @@ DWORD WINAPI CtrlRoutine( void *arg ) } -static LONG WINAPI handle_ctrl_c( EXCEPTION_POINTERS *eptr ) -{ - if (eptr->ExceptionRecord->ExceptionCode != CONTROL_C_EXIT) return EXCEPTION_CONTINUE_SEARCH; - if (!RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle) return EXCEPTION_CONTINUE_SEARCH; - - if (!(NtCurrentTeb()->Peb->ProcessParameters->ConsoleFlags & 1)) - { - HANDLE thread = CreateThread( NULL, 0, CtrlRoutine, (void*)CTRL_C_EVENT, 0, NULL ); - if (thread) CloseHandle( thread ); - } - return EXCEPTION_CONTINUE_EXECUTION; -} - - /****************************************************************************** * FillConsoleOutputAttribute (kernelbase.@) */ @@ -1854,6 +1840,4 @@ void init_console( void ) AllocConsole(); } else if (params->ConsoleHandle) create_console_connection( params->ConsoleHandle ); - - RtlAddVectoredExceptionHandler( FALSE, handle_ctrl_c ); } diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index e19b62cdaaf..54806b0ab22 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -72,6 +72,8 @@ typedef void (CALLBACK *LDRENUMPROC)(LDR_DATA_TABLE_ENTRY *, void *, BOOLEAN *) void (FASTCALL *pBaseThreadInitThunk)(DWORD,LPTHREAD_START_ROUTINE,void *) = NULL; +static DWORD (WINAPI *pCtrlRoutine)(void *); + const struct unix_funcs *unix_funcs = NULL; /* windows directory */ @@ -2939,6 +2941,17 @@ NTSTATUS __cdecl __wine_init_unix_lib( HMODULE module, DWORD reason, const void } +/*********************************************************************** + * __wine_ctrl_routine + */ +NTSTATUS WINAPI __wine_ctrl_routine( void *arg ) +{ + DWORD ret = 0; + + if (pCtrlRoutine && NtCurrentTeb()->Peb->ProcessParameters->ConsoleHandle) ret = pCtrlRoutine( arg ); + RtlExitUserThread( ret ); +} + /****************************************************************** * LdrLoadDll (NTDLL.@) */ @@ -3773,6 +3786,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR MESSAGE( "wine: could not find BaseThreadInitThunk in kernel32.dll, status %x\n", status ); NtTerminateProcess( GetCurrentProcess(), status ); } + RtlInitAnsiString( &func_name, "CtrlRoutine" ); + LdrGetProcedureAddress( kernel32_handle, &func_name, 0, (void **)&pCtrlRoutine ); actctx_init(); if (wm->ldr.Flags & LDR_COR_ILONLY) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 9113a5d54dc..6bd6579d432 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1616,6 +1616,7 @@ @ cdecl -syscall __wine_unix_call(int64 long ptr) @ cdecl __wine_set_unix_funcs(long ptr) @ cdecl __wine_init_unix_lib(long long ptr ptr) +@ stdcall __wine_ctrl_routine(ptr) @ extern __wine_syscall_dispatcher @ extern -arch=i386 __wine_ldt_copy diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 1830c4fb392..268f85994ae 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -109,6 +109,7 @@ void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULONG_PTR,P NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) = NULL; void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) = NULL; void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) = NULL; +void (WINAPI *p__wine_ctrl_routine)(void*); static NTSTATUS (CDECL *p__wine_set_unix_funcs)( int version, const struct unix_funcs *funcs ); @@ -836,6 +837,7 @@ static void load_ntdll_functions( HMODULE module ) GET_FUNC( KiUserApcDispatcher ); GET_FUNC( LdrInitializeThunk ); GET_FUNC( RtlUserThreadStart ); + GET_FUNC( __wine_ctrl_routine ); GET_FUNC( __wine_set_unix_funcs ); #undef GET_FUNC #define SET_PTR(name,val) \ diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index 3397e876722..0dba9cada94 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -716,9 +716,12 @@ static void fpe_handler( int signal, siginfo_t *siginfo, void *sigcontext ) */ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { - EXCEPTION_RECORD rec = { CONTROL_C_EXIT }; + HANDLE handle; - setup_exception( sigcontext, &rec ); + if (!p__wine_ctrl_routine) return; + if (!NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, NULL, NtCurrentProcess(), + p__wine_ctrl_routine, 0 /* CTRL_C_EVENT */, 0, 0, 0, 0, NULL )) + NtClose( handle ); } diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c index 5552704987f..a65184ba0a4 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c @@ -878,9 +878,12 @@ static void fpe_handler( int signal, siginfo_t *siginfo, void *sigcontext ) */ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { - EXCEPTION_RECORD rec = { CONTROL_C_EXIT }; + HANDLE handle; - setup_exception( sigcontext, &rec ); + if (!p__wine_ctrl_routine) return; + if (!NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, NULL, NtCurrentProcess(), + p__wine_ctrl_routine, 0 /* CTRL_C_EVENT */, 0, 0, 0, 0, NULL )) + NtClose( handle ); } diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c index 7aba553216f..b5afbcf0aac 100644 --- a/dlls/ntdll/unix/signal_i386.c +++ b/dlls/ntdll/unix/signal_i386.c @@ -1956,9 +1956,14 @@ static void fpe_handler( int signal, siginfo_t *siginfo, void *sigcontext ) */ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { - EXCEPTION_RECORD rec = { CONTROL_C_EXIT }; + HANDLE handle; - setup_exception( sigcontext, &rec ); + init_handler( sigcontext ); + + if (!p__wine_ctrl_routine) return; + if (!NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, NULL, NtCurrentProcess(), + p__wine_ctrl_routine, 0 /* CTRL_C_EVENT */, 0, 0, 0, 0, NULL )) + NtClose( handle ); } /********************************************************************** diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 524c9348ec2..148e3641d0e 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2427,9 +2427,12 @@ static void fpe_handler( int signal, siginfo_t *siginfo, void *sigcontext ) */ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { - EXCEPTION_RECORD rec = { CONTROL_C_EXIT }; + HANDLE handle; - setup_exception( sigcontext, &rec ); + if (!p__wine_ctrl_routine) return; + if (!NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, NULL, NtCurrentProcess(), + p__wine_ctrl_routine, 0 /* CTRL_C_EVENT */, 0, 0, 0, 0, NULL )) + NtClose( handle ); } diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index 39ab7912490..5ebbc6d702b 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -100,6 +100,7 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON extern NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) DECLSPEC_HIDDEN; extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) DECLSPEC_HIDDEN; extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN; +extern void (WINAPI *p__wine_ctrl_routine)(void *) DECLSPEC_HIDDEN; extern NTSTATUS CDECL fast_RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit, int timeout ) DECLSPEC_HIDDEN; extern NTSTATUS CDECL fast_RtlpUnWaitCriticalSection( RTL_CRITICAL_SECTION *crit ) DECLSPEC_HIDDEN; extern NTSTATUS CDECL fast_RtlDeleteCriticalSection( RTL_CRITICAL_SECTION *crit ) DECLSPEC_HIDDEN; diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index dd423ee5491..86dadad9277 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -2713,14 +2713,6 @@ static int main_loop( struct console *console, HANDLE signal ) return 0; } -static LONG WINAPI handle_ctrl_c( EXCEPTION_POINTERS *eptr ) -{ - if (eptr->ExceptionRecord->ExceptionCode != CONTROL_C_EXIT) return EXCEPTION_CONTINUE_SEARCH; - /* In Unix mode, ignore ctrl c exceptions. Signals are sent it to clients as well and we will - * terminate the usual way if they don't handle it. */ - return EXCEPTION_CONTINUE_EXECUTION; -} - int __cdecl wmain(int argc, WCHAR *argv[]) { int headless = 0, i, width = 0, height = 0; @@ -2810,7 +2802,5 @@ int __cdecl wmain(int argc, WCHAR *argv[]) ShowWindow( console.win, (si.dwFlags & STARTF_USESHOWWINDOW) ? si.wShowWindow : SW_SHOW ); } - if (console.is_unix) RtlAddVectoredExceptionHandler( FALSE, handle_ctrl_c ); - return main_loop( &console, signal ); }
1
0
0
0
Rémi Bernon : ntoskrnl.exe/tests: Add some buttons and hatswitch controls.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: 21fa04194ca99fe664d6eb37058718940bc11b68 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=21fa04194ca99fe664d6eb37…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Jun 4 11:12:17 2021 +0200 ntoskrnl.exe/tests: Add some buttons and hatswitch controls. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/driver_hid.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c index b34ba7f19ae..1fe644250f7 100644 --- a/dlls/ntoskrnl.exe/tests/driver_hid.c +++ b/dlls/ntoskrnl.exe/tests/driver_hid.c @@ -100,6 +100,27 @@ static const unsigned char report_descriptor[] = REPORT_SIZE(1, 8), REPORT_COUNT(1, 2), INPUT(1, Data|Var|Abs), + + USAGE_PAGE(1, HID_USAGE_PAGE_BUTTON), + USAGE_MINIMUM(1, 1), + USAGE_MAXIMUM(1, 8), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 1), + PHYSICAL_MINIMUM(1, 0), + PHYSICAL_MAXIMUM(1, 1), + REPORT_COUNT(1, 8), + REPORT_SIZE(1, 1), + INPUT(1, Data|Var|Abs), + + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), + USAGE(1, HID_USAGE_GENERIC_HATSWITCH), + LOGICAL_MINIMUM(1, 1), + LOGICAL_MAXIMUM(1, 8), + PHYSICAL_MINIMUM(1, 0), + PHYSICAL_MAXIMUM(1, 8), + REPORT_SIZE(1, 4), + REPORT_COUNT(1, 2), + INPUT(1, Data|Var|Abs), END_COLLECTION, }; @@ -181,7 +202,7 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) case IOCTL_HID_READ_REPORT: { - ULONG expected_size = 2; + ULONG expected_size = 4; ok(!in_size, "got input size %u\n", in_size); if (!test_failed) todo_wine ok(out_size == expected_size, "got output size %u\n", out_size); if (out_size != expected_size) test_failed = TRUE;
1
0
0
0
Rémi Bernon : ntoskrnl.exe/tests: Use HID helper macros to write report descriptors.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: 1722f8793897556b764d757861276b0debf9bacf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1722f8793897556b764d7578…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Jun 4 11:12:16 2021 +0200 ntoskrnl.exe/tests: Use HID helper macros to write report descriptors. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/driver_hid.c | 28 ++++++----- dlls/ntoskrnl.exe/tests/pop_hid_macros.h | 83 +++++++++++++++++++++++++++++++ dlls/ntoskrnl.exe/tests/psh_hid_macros.h | 85 ++++++++++++++++++++++++++++++++ 3 files changed, 184 insertions(+), 12 deletions(-) diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c index 0f626e6866c..b34ba7f19ae 100644 --- a/dlls/ntoskrnl.exe/tests/driver_hid.c +++ b/dlls/ntoskrnl.exe/tests/driver_hid.c @@ -85,22 +85,26 @@ static NTSTATUS WINAPI driver_power(DEVICE_OBJECT *device, IRP *irp) return PoCallDriver(ext->NextDeviceObject, irp); } +#include "psh_hid_macros.h" + static const unsigned char report_descriptor[] = { - 0x05, HID_USAGE_PAGE_GENERIC, - 0x09, HID_USAGE_GENERIC_JOYSTICK, - 0xa1, 0x01, /* application collection */ - 0x05, HID_USAGE_PAGE_GENERIC, - 0x09, HID_USAGE_GENERIC_X, - 0x09, HID_USAGE_GENERIC_Y, - 0x15, 0x80, /* logical minimum -128 */ - 0x25, 0x7f, /* logical maximum 127 */ - 0x75, 0x08, /* report size */ - 0x95, 0x02, /* report count */ - 0x81, 0x02, /* input, variable */ - 0xc0, /* end collection */ + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), + USAGE(1, HID_USAGE_GENERIC_JOYSTICK), + COLLECTION(1, Application), + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), + USAGE(1, HID_USAGE_GENERIC_X), + USAGE(1, HID_USAGE_GENERIC_Y), + LOGICAL_MINIMUM(1, -128), + LOGICAL_MAXIMUM(1, 127), + REPORT_SIZE(1, 8), + REPORT_COUNT(1, 2), + INPUT(1, Data|Var|Abs), + END_COLLECTION, }; +#include "pop_hid_macros.h" + static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) { static BOOL test_failed; diff --git a/dlls/ntoskrnl.exe/tests/pop_hid_macros.h b/dlls/ntoskrnl.exe/tests/pop_hid_macros.h new file mode 100644 index 00000000000..767c26e8ecb --- /dev/null +++ b/dlls/ntoskrnl.exe/tests/pop_hid_macros.h @@ -0,0 +1,83 @@ +/* + * HID report helper macros. + * + * Copyright 2021 Rémi Bernon for CodeWeavers + * + * 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 + */ + +#undef Data +#undef Cnst +#undef Array +#undef Var +#undef Abs +#undef Rel +#undef NoWrap +#undef Wrap +#undef NonLin +#undef Lin +#undef NoPref +#undef Pref +#undef NoNull +#undef Null +#undef NonVol +#undef Vol +#undef Bits +#undef Buff + +#undef Physical +#undef Application +#undef Logical +#undef Report +#undef NamedArray +#undef UsageSwitch +#undef UsageModifier + +#undef SHORT_ITEM_0 +#undef SHORT_ITEM_1 +#undef SHORT_ITEM_2 +#undef SHORT_ITEM_4 + +#undef LONG_ITEM + +#undef INPUT +#undef OUTPUT +#undef FEATURE +#undef COLLECTION +#undef END_COLLECTION + +#undef USAGE_PAGE +#undef LOGICAL_MINIMUM +#undef LOGICAL_MAXIMUM +#undef PHYSICAL_MINIMUM +#undef PHYSICAL_MAXIMUM +#undef UNIT_EXPONENT +#undef UNIT +#undef REPORT_SIZE +#undef REPORT_ID +#undef REPORT_COUNT +#undef PUSH +#undef POP + +#undef USAGE +#undef USAGE_MINIMUM +#undef USAGE_MAXIMUM +#undef DESIGNATOR_INDEX +#undef DESIGNATOR_MINIMUM +#undef DESIGNATOR_MAXIMUM +#undef STRING_INDEX +#undef STRING_MINIMUM +#undef STRING_MAXIMUM +#undef DELIMITER diff --git a/dlls/ntoskrnl.exe/tests/psh_hid_macros.h b/dlls/ntoskrnl.exe/tests/psh_hid_macros.h new file mode 100644 index 00000000000..4623af20598 --- /dev/null +++ b/dlls/ntoskrnl.exe/tests/psh_hid_macros.h @@ -0,0 +1,85 @@ +/* + * HID report helper macros. + * + * Copyright 2021 Rémi Bernon for CodeWeavers + * + * 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 + */ + +#include <hidusage.h> + +#define Data 0 +#define Cnst 0x01 +#define Ary 0 +#define Var 0x02 +#define Abs 0 +#define Rel 0x04 +#define NoWrap 0 +#define Wrap 0x08 +#define NonLin 0 +#define Lin 0x10 +#define NoPref 0 +#define Pref 0x20 +#define NoNull 0 +#define Null 0x40 +#define NonVol 0 +#define Vol 0x80 +#define Bits 0 +#define Buff 0x100 + +#define Physical 0x00 +#define Application 0x01 +#define Logical 0x02 +#define Report 0x03 +#define NamedArray 0x04 +#define UsageSwitch 0x05 +#define UsageModifier 0x06 + +#define SHORT_ITEM_0(tag,type) (((tag)<<4)|((type)<<2)|0) +#define SHORT_ITEM_1(tag,type,data) (((tag)<<4)|((type)<<2)|1),((data)&0xff) +#define SHORT_ITEM_2(tag,type,data) (((tag)<<4)|((type)<<2)|2),((data)&0xff),(((data)>>8)&0xff) +#define SHORT_ITEM_4(tag,type,data) (((tag)<<4)|((type)<<2)|3),((data)&0xff),(((data)>>8)&0xff),(((data)>>16)&0xff),(((data)>>24)&0xff) + +#define LONG_ITEM(tag,size) SHORT_ITEM_2(0xf,0x3,((tag)<<8)|(size)) + +#define INPUT(n,data) SHORT_ITEM_##n(0x8,0,data) +#define OUTPUT(n,data) SHORT_ITEM_##n(0x9,0,data) +#define FEATURE(n,data) SHORT_ITEM_##n(0xb,0,data) +#define COLLECTION(n,data) SHORT_ITEM_##n(0xa,0,data) +#define END_COLLECTION SHORT_ITEM_0(0xc,0) + +#define USAGE_PAGE(n,data) SHORT_ITEM_##n(0x0,1,data) +#define LOGICAL_MINIMUM(n,data) SHORT_ITEM_##n(0x1,1,data) +#define LOGICAL_MAXIMUM(n,data) SHORT_ITEM_##n(0x2,1,data) +#define PHYSICAL_MINIMUM(n,data) SHORT_ITEM_##n(0x3,1,data) +#define PHYSICAL_MAXIMUM(n,data) SHORT_ITEM_##n(0x4,1,data) +#define UNIT_EXPONENT(n,data) SHORT_ITEM_##n(0x5,1,data) +#define UNIT(n,data) SHORT_ITEM_##n(0x6,1,data) +#define REPORT_SIZE(n,data) SHORT_ITEM_##n(0x7,1,data) +#define REPORT_ID(n,data) SHORT_ITEM_##n(0x8,1,data) +#define REPORT_COUNT(n,data) SHORT_ITEM_##n(0x9,1,data) +#define PUSH(n,data) SHORT_ITEM_##n(0xa,1,data) +#define POP(n,data) SHORT_ITEM_##n(0xb,1,data) + +#define USAGE(n,data) SHORT_ITEM_##n(0x0,2,data) +#define USAGE_MINIMUM(n,data) SHORT_ITEM_##n(0x1,2,data) +#define USAGE_MAXIMUM(n,data) SHORT_ITEM_##n(0x2,2,data) +#define DESIGNATOR_INDEX(n,data) SHORT_ITEM_##n(0x3,2,data) +#define DESIGNATOR_MINIMUM(n,data) SHORT_ITEM_##n(0x4,2,data) +#define DESIGNATOR_MAXIMUM(n,data) SHORT_ITEM_##n(0x5,2,data) +#define STRING_INDEX(n,data) SHORT_ITEM_##n(0x6,2,data) +#define STRING_MINIMUM(n,data) SHORT_ITEM_##n(0x7,2,data) +#define STRING_MAXIMUM(n,data) SHORT_ITEM_##n(0x8,2,data) +#define DELIMITER(n,data) SHORT_ITEM_##n(0x9,2,data)
1
0
0
0
Rémi Bernon : ntoskrnl.exe/tests: Silent a todo_wine failing test after a while.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: 4c81c50f449a5ead6cfebd8f1e284da407a2795b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4c81c50f449a5ead6cfebd8f…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Jun 4 11:12:15 2021 +0200 ntoskrnl.exe/tests: Silent a todo_wine failing test after a while. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/driver_hid.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c index 44ec1b09526..0f626e6866c 100644 --- a/dlls/ntoskrnl.exe/tests/driver_hid.c +++ b/dlls/ntoskrnl.exe/tests/driver_hid.c @@ -103,6 +103,7 @@ static const unsigned char report_descriptor[] = static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) { + static BOOL test_failed; IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp); const ULONG in_size = stack->Parameters.DeviceIoControl.InputBufferLength; const ULONG out_size = stack->Parameters.DeviceIoControl.OutputBufferLength; @@ -175,11 +176,15 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) } case IOCTL_HID_READ_REPORT: + { + ULONG expected_size = 2; ok(!in_size, "got input size %u\n", in_size); - todo_wine ok(out_size == 2, "got output size %u\n", out_size); + if (!test_failed) todo_wine ok(out_size == expected_size, "got output size %u\n", out_size); + if (out_size != expected_size) test_failed = TRUE; ret = STATUS_NOT_IMPLEMENTED; break; + } case IOCTL_HID_GET_STRING: ok(!in_size, "got input size %u\n", in_size);
1
0
0
0
Alistair Leslie-Hughes : msado15: Convert to Integer for field index.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: f6fc0e2b7722e5fe3c6bdfb31101ac5ef1c39670 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f6fc0e2b7722e5fe3c6bdfb3…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Jun 9 16:41:32 2021 +1000 msado15: Convert to Integer for field index. Thanks Gabriel Ivăncescu. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msado15/recordset.c | 24 ++++++++++-------------- dlls/msado15/tests/msado15.c | 17 +++++++++++++++++ 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index 7cd943f55d5..92a0deb6959 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -740,28 +740,24 @@ static HRESULT map_index( struct fields *fields, VARIANT *index, ULONG *ret ) { ULONG i; - if (V_VT( index ) == VT_I4 || V_VT( index ) == VT_I2) + if (V_VT( index ) != VT_BSTR) { - if (V_VT( index ) == VT_I4) - i = V_I4 ( index ); - else - i = V_I2 ( index ); + VARIANT idx; - if (i < fields->count) + VariantInit(&idx); + if (VariantChangeType(&idx, index, 0, VT_UI4) == S_OK) { - *ret = i; - return S_OK; + i = V_UI4 ( &idx ); + if (i < fields->count) + { + *ret = i; + return S_OK; + } } return MAKE_ADO_HRESULT(adErrItemNotFound); } - if (V_VT( index ) != VT_BSTR) - { - FIXME( "variant type %u not supported\n", V_VT( index ) ); - return E_INVALIDARG; - } - for (i = 0; i < fields->count; i++) { BSTR name; diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index 860144338c0..25c9c6f8356 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -150,6 +150,23 @@ static void test_Recordset(void) ok( hr == S_OK, "got %08x\n", hr ); Field_Release(field); + V_VT( &index ) = VT_I1; + V_I1( &index ) = 0; + hr = Fields_get_Item( fields, index, &field ); + ok( hr == S_OK, "got %08x\n", hr ); + Field_Release(field); + + V_VT( &index ) = VT_R8; + V_R8( &index ) = 0.1; + hr = Fields_get_Item( fields, index, &field ); + ok( hr == S_OK, "got %08x\n", hr ); + Field_Release(field); + + V_VT( &index ) = VT_UNKNOWN; + V_UNKNOWN( &index ) = NULL; + hr = Fields_get_Item( fields, index, &field ); + ok( hr == MAKE_ADO_HRESULT(adErrItemNotFound), "got %08x\n", hr ); + V_VT( &index ) = VT_BSTR; V_BSTR( &index ) = name; hr = Fields_get_Item( fields, index, &field );
1
0
0
0
Zebediah Figura : ws2_32: Return WSAEOPNOTSUPP in FIOASYNC.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: 0a4a7c434500ccba883a05ca062550e41384ce7a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0a4a7c434500ccba883a05ca…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Jun 9 00:04:49 2021 -0500 ws2_32: Return WSAEOPNOTSUPP in FIOASYNC. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 5 ----- dlls/ws2_32/tests/sock.c | 45 ++++++++++++++++----------------------------- 2 files changed, 16 insertions(+), 34 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 08ea427913b..a4d0e932eae 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3276,11 +3276,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID return ret ? -1 : 0; } - case WS_FIOASYNC: - WARN("Warning: WS1.1 shouldn't be using async I/O\n"); - SetLastError(WSAEINVAL); - return SOCKET_ERROR; - case WS_SIO_GET_INTERFACE_LIST: { DWORD ret; diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index c654e442364..d9cb629caa4 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -4136,35 +4136,27 @@ static void test_unsupported_ioctls(void) size = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, NULL, NULL); ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC) - ok(WSAGetLastError() == WSAEOPNOTSUPP, "got error %u\n", WSAGetLastError()); - todo_wine_if (codes[i] == FIOASYNC) - ok(!size, "got size %u\n", size); + ok(WSAGetLastError() == WSAEOPNOTSUPP, "got error %u\n", WSAGetLastError()); + ok(!size, "got size %u\n", size); WSASetLastError(0xdeadbeef); size = 0xdeadbeef; overlapped.Internal = 0xdeadbeef; overlapped.InternalHigh = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, NULL); - ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC) - ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); + ok(ret == -1, "expected failure\n"); + ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); ok(size == 0xdeadbeef, "got size %u\n", size); ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0); ok(!ret, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC) - ok(GetLastError() == ERROR_NOT_SUPPORTED, "got error %u\n", GetLastError()); - todo_wine_if (codes[i] == FIOASYNC) - ok(!size, "got size %u\n", size); + ok(GetLastError() == ERROR_NOT_SUPPORTED, "got error %u\n", GetLastError()); + ok(!size, "got size %u\n", size); ok(key == 123, "got key %Iu\n", key); - todo_wine_if (codes[i] == FIOASYNC) - ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); - todo_wine_if (codes[i] == FIOASYNC) - ok((NTSTATUS)overlapped.Internal == STATUS_NOT_SUPPORTED, - "got status %#x\n", (NTSTATUS)overlapped.Internal); - todo_wine_if (codes[i] == FIOASYNC) - ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh); + ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); + ok((NTSTATUS)overlapped.Internal == STATUS_NOT_SUPPORTED, + "got status %#x\n", (NTSTATUS)overlapped.Internal); + ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh); CloseHandle(port); closesocket(s); @@ -4179,20 +4171,15 @@ static void test_unsupported_ioctls(void) size = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, socket_apc); ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC) - ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); + ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); ok(size == 0xdeadbeef, "got size %u\n", size); ret = SleepEx(0, TRUE); - todo_wine_if (codes[i] == FIOASYNC) - ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); - if (ret == WAIT_IO_COMPLETION) - { - ok(apc_count == 1, "APC was called %u times\n", apc_count); - ok(apc_error == WSAEOPNOTSUPP, "got APC error %u\n", apc_error); - ok(!apc_size, "got APC size %u\n", apc_size); - ok(apc_overlapped == &overlapped, "got APC overlapped %p\n", apc_overlapped); - } + ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); + ok(apc_count == 1, "APC was called %u times\n", apc_count); + ok(apc_error == WSAEOPNOTSUPP, "got APC error %u\n", apc_error); + ok(!apc_size, "got APC size %u\n", apc_size); + ok(apc_overlapped == &overlapped, "got APC overlapped %p\n", apc_overlapped); closesocket(s); winetest_pop_context();
1
0
0
0
Zebediah Figura : ws2_32: Return WSAEOPNOTSUPP in SIO_FLUSH.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: b8bb6bae8f46a7ed3e33c6ddc56c6791662639e3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b8bb6bae8f46a7ed3e33c6dd…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Jun 9 00:04:48 2021 -0500 ws2_32: Return WSAEOPNOTSUPP in SIO_FLUSH. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 4 ---- dlls/ws2_32/tests/sock.c | 28 +++++++++++----------------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 3b68d2e6336..08ea427913b 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3369,10 +3369,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID } } - case WS_SIO_FLUSH: - FIXME("SIO_FLUSH: stub.\n"); - break; - case WS_SIO_GET_EXTENSION_FUNCTION_POINTER: { #define EXTENSION_FUNCTION(x, y) { x, y, #y }, diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 5b833ca8ba7..c654e442364 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -4135,9 +4135,8 @@ static void test_unsupported_ioctls(void) WSASetLastError(0xdeadbeef); size = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, NULL, NULL); - todo_wine_if (codes[i] == SIO_FLUSH) - ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(ret == -1, "expected failure\n"); + todo_wine_if (codes[i] == FIOASYNC) ok(WSAGetLastError() == WSAEOPNOTSUPP, "got error %u\n", WSAGetLastError()); todo_wine_if (codes[i] == FIOASYNC) ok(!size, "got size %u\n", size); @@ -4147,24 +4146,21 @@ static void test_unsupported_ioctls(void) overlapped.Internal = 0xdeadbeef; overlapped.InternalHigh = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, NULL); - todo_wine_if (codes[i] == SIO_FLUSH) ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + todo_wine_if (codes[i] == FIOASYNC) ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); - todo_wine_if (codes[i] == SIO_FLUSH) - ok(size == 0xdeadbeef, "got size %u\n", size); + ok(size == 0xdeadbeef, "got size %u\n", size); ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0); - todo_wine_if (codes[i] == SIO_FLUSH) - ok(!ret, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(!ret, "expected failure\n"); + todo_wine_if (codes[i] == FIOASYNC) ok(GetLastError() == ERROR_NOT_SUPPORTED, "got error %u\n", GetLastError()); todo_wine_if (codes[i] == FIOASYNC) ok(!size, "got size %u\n", size); ok(key == 123, "got key %Iu\n", key); todo_wine_if (codes[i] == FIOASYNC) ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + todo_wine_if (codes[i] == FIOASYNC) ok((NTSTATUS)overlapped.Internal == STATUS_NOT_SUPPORTED, "got status %#x\n", (NTSTATUS)overlapped.Internal); todo_wine_if (codes[i] == FIOASYNC) @@ -4182,15 +4178,13 @@ static void test_unsupported_ioctls(void) apc_count = 0; size = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, socket_apc); - todo_wine_if (codes[i] == SIO_FLUSH) - ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(ret == -1, "expected failure\n"); + todo_wine_if (codes[i] == FIOASYNC) ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); - todo_wine_if (codes[i] == SIO_FLUSH) - ok(size == 0xdeadbeef, "got size %u\n", size); + ok(size == 0xdeadbeef, "got size %u\n", size); ret = SleepEx(0, TRUE); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + todo_wine_if (codes[i] == FIOASYNC) ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); if (ret == WAIT_IO_COMPLETION) {
1
0
0
0
Zebediah Figura : ws2_32: Use IOCTL_AFD_WINE_COMPLETE_ASYNC for unimplemented ioctls.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: ee03ed09f637f2992613578a2daf5f0d5fcf0f4a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ee03ed09f637f2992613578a…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Jun 9 00:04:47 2021 -0500 ws2_32: Use IOCTL_AFD_WINE_COMPLETE_ASYNC for unimplemented ioctls. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 28 +++++++++++++++++++--------- dlls/ws2_32/tests/sock.c | 21 ++++++++++++--------- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 6f111e263c2..3b68d2e6336 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3491,16 +3491,9 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID return ret ? -1 : 0; } - case WS_SIO_SET_COMPATIBILITY_MODE: - TRACE("WS_SIO_SET_COMPATIBILITY_MODE ignored\n"); - status = WSAEOPNOTSUPP; - break; case WS_SIO_UDP_CONNRESET: FIXME("WS_SIO_UDP_CONNRESET stub\n"); break; - case 0x667e: /* Netscape tries hard to use bogus ioctl 0x667e */ - SetLastError(WSAEOPNOTSUPP); - return SOCKET_ERROR; case WS_SIO_ADDRESS_LIST_CHANGE: { @@ -3515,8 +3508,25 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID default: FIXME( "unimplemented ioctl %s\n", debugstr_wsaioctl( code ) ); - status = WSAEOPNOTSUPP; - break; + /* fall through */ + case LOWORD(WS_FIONBIO): /* Netscape tries to use this */ + case WS_SIO_SET_COMPATIBILITY_MODE: + { + NTSTATUS status = STATUS_NOT_SUPPORTED; + + server_ioctl_sock( s, IOCTL_AFD_WINE_COMPLETE_ASYNC, &status, sizeof(status), + NULL, 0, ret_size, overlapped, completion ); + if (overlapped) + { + SetLastError( ERROR_IO_PENDING ); + } + else + { + *ret_size = 0; + SetLastError( WSAEOPNOTSUPP ); + } + return -1; + } } if (completion) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 055fdf8feae..5b833ca8ba7 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -4139,7 +4139,7 @@ static void test_unsupported_ioctls(void) ok(ret == -1, "expected failure\n"); todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) ok(WSAGetLastError() == WSAEOPNOTSUPP, "got error %u\n", WSAGetLastError()); - todo_wine_if (codes[i] != SIO_FLUSH) + todo_wine_if (codes[i] == FIOASYNC) ok(!size, "got size %u\n", size); WSASetLastError(0xdeadbeef); @@ -4149,24 +4149,25 @@ static void test_unsupported_ioctls(void) ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, NULL); todo_wine_if (codes[i] == SIO_FLUSH) ok(ret == -1, "expected failure\n"); - todo_wine ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); + todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); todo_wine_if (codes[i] == SIO_FLUSH) ok(size == 0xdeadbeef, "got size %u\n", size); ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0); todo_wine_if (codes[i] == SIO_FLUSH) ok(!ret, "expected failure\n"); - todo_wine_if (codes[i] != 0xdeadbeef) + todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) ok(GetLastError() == ERROR_NOT_SUPPORTED, "got error %u\n", GetLastError()); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == 0x667e) + todo_wine_if (codes[i] == FIOASYNC) ok(!size, "got size %u\n", size); ok(key == 123, "got key %Iu\n", key); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == 0x667e) + todo_wine_if (codes[i] == FIOASYNC) ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); - todo_wine_if (codes[i] != 0xdeadbeef) + todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) ok((NTSTATUS)overlapped.Internal == STATUS_NOT_SUPPORTED, "got status %#x\n", (NTSTATUS)overlapped.Internal); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == 0x667e) + todo_wine_if (codes[i] == FIOASYNC) ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh); CloseHandle(port); @@ -4183,12 +4184,14 @@ static void test_unsupported_ioctls(void) ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, socket_apc); todo_wine_if (codes[i] == SIO_FLUSH) ok(ret == -1, "expected failure\n"); - todo_wine ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); + todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); todo_wine_if (codes[i] == SIO_FLUSH) ok(size == 0xdeadbeef, "got size %u\n", size); ret = SleepEx(0, TRUE); - todo_wine ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); + todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); if (ret == WAIT_IO_COMPLETION) { ok(apc_count == 1, "APC was called %u times\n", apc_count);
1
0
0
0
Zebediah Figura : ws2_32: Use IOCTL_WINE_AFD_COMPLETE_ASYNC in SIO_ROUTING_INTERFACE_QUERY.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: dddd46624be3915cbb025092e12bd5483fbf6200 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dddd46624be3915cbb025092…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Jun 9 00:04:46 2021 -0500 ws2_32: Use IOCTL_WINE_AFD_COMPLETE_ASYNC in SIO_ROUTING_INTERFACE_QUERY. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 27 ++++++++++++++++----------- dlls/ws2_32/tests/sock.c | 21 +++++++++------------ 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 7493b9e9f87..6f111e263c2 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3435,7 +3435,8 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID struct WS_sockaddr_in *saddr_in = out_buff; MIB_IPFORWARDROW row; PMIB_IPADDRTABLE ipAddrTable = NULL; - DWORD size, i, found_index; + DWORD size, i, found_index, ret = 0; + NTSTATUS status = STATUS_SUCCESS; TRACE( "-> WS_SIO_ROUTING_INTERFACE_QUERY request\n" ); @@ -3448,21 +3449,21 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID if (daddr->sa_family != WS_AF_INET) { FIXME("unsupported address family %d\n", daddr->sa_family); - status = WSAEAFNOSUPPORT; - break; + SetLastError( WSAEAFNOSUPPORT ); + return -1; } if (GetBestRoute( daddr_in->sin_addr.S_un.S_addr, 0, &row ) != NOERROR || GetIpAddrTable( NULL, &size, FALSE ) != ERROR_INSUFFICIENT_BUFFER) { - status = WSAEFAULT; - break; + SetLastError( WSAEFAULT ); + return -1; } ipAddrTable = HeapAlloc( GetProcessHeap(), 0, size ); if (GetIpAddrTable( ipAddrTable, &size, FALSE )) { HeapFree( GetProcessHeap(), 0, ipAddrTable ); - status = WSAEFAULT; - break; + SetLastError( WSAEFAULT ); + return -1; } for (i = 0, found_index = ipAddrTable->dwNumEntries; i < ipAddrTable->dwNumEntries; i++) @@ -3475,15 +3476,19 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID ERR("no matching IP address for interface %d\n", row.dwForwardIfIndex); HeapFree( GetProcessHeap(), 0, ipAddrTable ); - status = WSAEFAULT; - break; + SetLastError( WSAEFAULT ); + return -1; } saddr_in->sin_family = WS_AF_INET; saddr_in->sin_addr.S_un.S_addr = ipAddrTable->table[found_index].dwAddr; saddr_in->sin_port = 0; - total = sizeof(struct WS_sockaddr_in); HeapFree( GetProcessHeap(), 0, ipAddrTable ); - break; + + ret = server_ioctl_sock( s, IOCTL_AFD_WINE_COMPLETE_ASYNC, &status, sizeof(status), + NULL, 0, ret_size, overlapped, completion ); + if (!ret) *ret_size = sizeof(struct WS_sockaddr_in); + SetLastError( ret ); + return ret ? -1 : 0; } case WS_SIO_SET_COMPATIBILITY_MODE: diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 3648fa2a329..055fdf8feae 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -7770,7 +7770,7 @@ static void test_sioRoutingInterfaceQuery(void) size = 0xdeadbeef; ret = WSAIoctl(sock, SIO_ROUTING_INTERFACE_QUERY, &in, sizeof(in), &out, sizeof(out), &size, NULL, NULL); ok(!ret, "expected failure\n"); - todo_wine ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); + ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); ok(size == sizeof(out), "got size %u\n", size); /* We expect the source address to be INADDR_LOOPBACK as well, but * there's no guarantee that a route to the loopback address exists, @@ -7801,15 +7801,15 @@ static void test_sioRoutingInterfaceQuery(void) overlapped.InternalHigh = 0xdeadbeef; ret = WSAIoctl(sock, SIO_ROUTING_INTERFACE_QUERY, &in, sizeof(in), &out, sizeof(out), &size, &overlapped, NULL); ok(!ret, "expected failure\n"); - todo_wine ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); + ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); ok(size == sizeof(out), "got size %u\n", size); ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0); ok(ret, "got error %u\n", GetLastError()); - todo_wine ok(!size, "got size %u\n", size); + ok(!size, "got size %u\n", size); ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); ok(!overlapped.Internal, "got status %#x\n", (NTSTATUS)overlapped.Internal); - todo_wine ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh); + ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh); CloseHandle(port); closesocket(sock); @@ -7829,14 +7829,11 @@ static void test_sioRoutingInterfaceQuery(void) ok(size == sizeof(out), "got size %u\n", size); ret = SleepEx(0, TRUE); - todo_wine ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); - if (ret == WAIT_IO_COMPLETION) - { - ok(apc_count == 1, "APC was called %u times\n", apc_count); - ok(!apc_error, "got APC error %u\n", apc_error); - ok(!apc_size, "got APC size %u\n", apc_size); - ok(apc_overlapped == &overlapped, "got APC overlapped %p\n", apc_overlapped); - } + ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); + ok(apc_count == 1, "APC was called %u times\n", apc_count); + ok(!apc_error, "got APC error %u\n", apc_error); + ok(!apc_size, "got APC size %u\n", apc_size); + ok(apc_overlapped == &overlapped, "got APC overlapped %p\n", apc_overlapped); closesocket(sock); }
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
82
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Results per page:
10
25
50
100
200