Commit a24f10b5 authored by Wolfgang Walter's avatar Wolfgang Walter Committed by Alexandre Julliard

ntdll: Fix set_XOff and set_XOn.

parent c52fd346
...@@ -800,39 +800,25 @@ static NTSTATUS set_wait_mask(HANDLE hDevice, DWORD mask) ...@@ -800,39 +800,25 @@ static NTSTATUS set_wait_mask(HANDLE hDevice, DWORD mask)
return status; return status;
} }
/*
* does not change IXOFF but simulates that IXOFF has been received:
*/
static NTSTATUS set_XOff(int fd) static NTSTATUS set_XOff(int fd)
{ {
struct termios port; if (tcflow(fd, TCOOFF))
if (tcgetattr(fd,&port) == -1)
{
FIXME("tcgetattr on fd %d failed (%s)!\n", fd, strerror(errno));
return FILE_GetNtStatus();
}
port.c_iflag |= IXOFF;
if (tcsetattr(fd, TCSADRAIN, &port) == -1)
{ {
FIXME("tcsetattr on fd %d failed (%s)!\n", fd, strerror(errno));
return FILE_GetNtStatus(); return FILE_GetNtStatus();
} }
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/*
* does not change IXON but simulates that IXON has been received:
*/
static NTSTATUS set_XOn(int fd) static NTSTATUS set_XOn(int fd)
{ {
struct termios port; if (tcflow(fd, TCOON))
if (tcgetattr(fd,&port) == -1)
{
FIXME("tcgetattr on fd %d failed (%s)!\n", fd, strerror(errno));
return FILE_GetNtStatus();
}
port.c_iflag |= IXON;
if (tcsetattr(fd, TCSADRAIN, &port) == -1)
{ {
FIXME("tcsetattr on fd %d failed (%s)!\n", fd, strerror(errno));
return FILE_GetNtStatus(); return FILE_GetNtStatus();
} }
return STATUS_SUCCESS; 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