ntdll: Correct space/mark parity.
When CMSPAR is defined, the space and mark parity is reversed: the flag PARODD isn't set correctly. Signed-off-by: Julien D'ascenzio <Julien.Dascenzio@paratronic.fr> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5bfbcb735b
commit
257850e7ec
|
@ -280,8 +280,8 @@ static NTSTATUS get_line_control(int fd, SERIAL_LINE_CONTROL* slc)
|
||||||
case PARENB: slc->Parity = EVENPARITY; break;
|
case PARENB: slc->Parity = EVENPARITY; break;
|
||||||
case PARENB|PARODD: slc->Parity = ODDPARITY; break;
|
case PARENB|PARODD: slc->Parity = ODDPARITY; break;
|
||||||
#ifdef CMSPAR
|
#ifdef CMSPAR
|
||||||
case PARENB|CMSPAR: slc->Parity = MARKPARITY; break;
|
case PARENB|PARODD|CMSPAR: slc->Parity = MARKPARITY; break;
|
||||||
case PARENB|PARODD|CMSPAR: slc->Parity = SPACEPARITY; break;
|
case PARENB|CMSPAR: slc->Parity = SPACEPARITY; break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
switch (port.c_cflag & CSIZE)
|
switch (port.c_cflag & CSIZE)
|
||||||
|
@ -676,8 +676,8 @@ static NTSTATUS set_line_control(int fd, const SERIAL_LINE_CONTROL* slc)
|
||||||
case EVENPARITY: port.c_cflag |= PARENB; break;
|
case EVENPARITY: port.c_cflag |= PARENB; break;
|
||||||
#ifdef CMSPAR
|
#ifdef CMSPAR
|
||||||
/* Linux defines mark/space (stick) parity */
|
/* Linux defines mark/space (stick) parity */
|
||||||
case MARKPARITY: port.c_cflag |= PARENB | CMSPAR; break;
|
case MARKPARITY: port.c_cflag |= PARENB | PARODD | CMSPAR; break;
|
||||||
case SPACEPARITY: port.c_cflag |= PARENB | PARODD | CMSPAR; break;
|
case SPACEPARITY: port.c_cflag |= PARENB | CMSPAR; break;
|
||||||
#else
|
#else
|
||||||
/* try the POSIX way */
|
/* try the POSIX way */
|
||||||
case MARKPARITY:
|
case MARKPARITY:
|
||||||
|
|
Loading…
Reference in New Issue