Commit 52d10805 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

ntdll: Properly set flag which indicates buffer empty state.

parent a5eb9eee
......@@ -851,6 +851,7 @@ todo_wine
{
res = GetOverlappedResult(hcom, &ovl_wait, &bytes, FALSE);
ok(res, "GetOverlappedResult reported error %d\n", GetLastError());
todo_wine
ok(bytes == sizeof(evtmask), "expected %u, written %u\n", (UINT)sizeof(evtmask), bytes);
res = TRUE;
}
......
......@@ -838,16 +838,13 @@ static NTSTATUS get_irq_info(int fd, serial_irq_info *irq_info)
TRACE("TIOCSERGETLSR err %s\n", strerror(errno));
#endif
#ifdef TIOCOUTQ /* otherwise we log when the out queue gets empty */
if (ioctl(fd, TIOCOUTQ, &irq_info->temt))
if (!ioctl(fd, TIOCOUTQ, &out))
{
TRACE("TIOCOUTQ err %s\n", strerror(errno));
return FILE_GetNtStatus();
}
else
{
if (irq_info->temt == 0)
irq_info->temt = 1;
irq_info->temt = out == 0;
return STATUS_SUCCESS;
}
TRACE("TIOCOUTQ err %s\n", strerror(errno));
return FILE_GetNtStatus();
#endif
return STATUS_SUCCESS;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment