From: Bernhard Übelacker bernhardu@mailbox.org
Cygwin/MSYS2 in version 3.5.4 or later relies in having the WriteQuotaAvailable member of a NtQueryInformationFile(FilePipeLocalInformation) query properly filled.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57424 --- dlls/ntdll/tests/pipe.c | 1 - server/named_pipe.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index cf98d555455..14a6148a2c5 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -2309,7 +2309,6 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state) ok(local_info.ReadDataAvailable == 0, "ReadDataAvailable = %lu\n", local_info.ReadDataAvailable); ok(local_info.OutboundQuota == 200, "OutboundQuota = %lu\n", local_info.OutboundQuota); - todo_wine ok(local_info.WriteQuotaAvailable == (is_server ? 200 : 100), "WriteQuotaAvailable = %lu\n", local_info.WriteQuotaAvailable); ok(local_info.NamedPipeState == state, "%s NamedPipeState = %lu, expected %lu\n", diff --git a/server/named_pipe.c b/server/named_pipe.c index 6e4ae371a1b..8cc7f36f408 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -854,10 +854,12 @@ static void pipe_end_get_file_info( struct fd *fd, obj_handle_t handle, unsigned pipe_info->ReadDataAvailable = pipe_end_get_avail( pipe_end );
pipe_info->OutboundQuota = pipe->outsize; - pipe_info->WriteQuotaAvailable = 0; /* FIXME */ pipe_info->NamedPipeState = pipe_end->state; pipe_info->NamedPipeEnd = pipe_end->obj.ops == &pipe_server_ops ? FILE_PIPE_SERVER_END : FILE_PIPE_CLIENT_END; + + pipe_info->WriteQuotaAvailable = pipe_info->NamedPipeEnd == FILE_PIPE_CLIENT_END + ? pipe_info->InboundQuota : pipe_info->OutboundQuota; break; } case FileStandardInformation: