Module: wine Branch: master Commit: aaea13a128b76fa0076b8852187c7d10e5eb5d68 URL: https://source.winehq.org/git/wine.git/?a=commit;h=aaea13a128b76fa0076b88521...
Author: Zebediah Figura z.figura12@gmail.com Date: Sun Aug 16 19:36:03 2020 -0500
server: Report named pipe device files as type "File".
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/tests/om.c | 10 ++++------ server/named_pipe.c | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 29c777e91e..916ac8cbe7 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -1227,9 +1227,8 @@ static BOOL compare_unicode_string( const UNICODE_STRING *string, const WCHAR *e && !wcsnicmp( string->Buffer, expect, string->Length / sizeof(WCHAR) ); }
-#define test_object_type(a,b) _test_object_type(__LINE__,a,b,FALSE) -#define test_object_type_todo(a,b) _test_object_type(__LINE__,a,b,TRUE) -static void _test_object_type( unsigned line, HANDLE handle, const WCHAR *expected_name, BOOL todo ) +#define test_object_type(a,b) _test_object_type(__LINE__,a,b) +static void _test_object_type( unsigned line, HANDLE handle, const WCHAR *expected_name ) { char buffer[1024]; UNICODE_STRING *str = (UNICODE_STRING *)buffer, expect; @@ -1243,8 +1242,7 @@ static void _test_object_type( unsigned line, HANDLE handle, const WCHAR *expect ok_(__FILE__,line)( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status ); ok_(__FILE__,line)( len > sizeof(UNICODE_STRING), "unexpected len %u\n", len ); ok_(__FILE__,line)( len >= sizeof(OBJECT_TYPE_INFORMATION) + str->Length, "unexpected len %u\n", len ); - todo_wine_if (todo) - ok_(__FILE__,line)(compare_unicode_string( str, expected_name ), "wrong name %s\n", debugstr_w( str->Buffer )); + ok_(__FILE__,line)(compare_unicode_string( str, expected_name ), "wrong name %s\n", debugstr_w( str->Buffer )); }
#define test_object_name(a,b,c) _test_object_name(__LINE__,a,b,c) @@ -1463,7 +1461,7 @@ static void test_query_object(void) ok( handle != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError() );
test_object_name( handle, L"\Device\NamedPipe", TRUE ); - test_object_type_todo( handle, L"File" ); + test_object_type( handle, L"File" ); test_file_info( handle );
pNtClose( handle ); diff --git a/server/named_pipe.c b/server/named_pipe.c index b259abb8de..e7e5436c0e 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -273,7 +273,7 @@ static const struct object_ops named_pipe_device_file_ops = { sizeof(struct named_pipe_device_file), /* size */ named_pipe_device_file_dump, /* dump */ - no_get_type, /* get_type */ + file_get_type, /* get_type */ add_queue, /* add_queue */ remove_queue, /* remove_queue */ default_fd_signaled, /* signaled */