ntdll: Properly set flag which indicates buffer empty state.

This commit is contained in:
Dmitry Timoshkov 2013-08-29 10:26:24 +09:00 committed by Alexandre Julliard
parent a5eb9eee42
commit 52d1080544
2 changed files with 6 additions and 8 deletions

View File

@ -851,6 +851,7 @@ todo_wine
{ {
res = GetOverlappedResult(hcom, &ovl_wait, &bytes, FALSE); res = GetOverlappedResult(hcom, &ovl_wait, &bytes, FALSE);
ok(res, "GetOverlappedResult reported error %d\n", GetLastError()); ok(res, "GetOverlappedResult reported error %d\n", GetLastError());
todo_wine
ok(bytes == sizeof(evtmask), "expected %u, written %u\n", (UINT)sizeof(evtmask), bytes); ok(bytes == sizeof(evtmask), "expected %u, written %u\n", (UINT)sizeof(evtmask), bytes);
res = TRUE; res = TRUE;
} }

View File

@ -838,16 +838,13 @@ static NTSTATUS get_irq_info(int fd, serial_irq_info *irq_info)
TRACE("TIOCSERGETLSR err %s\n", strerror(errno)); TRACE("TIOCSERGETLSR err %s\n", strerror(errno));
#endif #endif
#ifdef TIOCOUTQ /* otherwise we log when the out queue gets empty */ #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)); irq_info->temt = out == 0;
return FILE_GetNtStatus(); return STATUS_SUCCESS;
}
else
{
if (irq_info->temt == 0)
irq_info->temt = 1;
} }
TRACE("TIOCOUTQ err %s\n", strerror(errno));
return FILE_GetNtStatus();
#endif #endif
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }