tty_ioctl.4: Fix error in code example

Reported-by: Denis Du <denisdu@ruggedcom.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-05-01 21:07:52 +02:00
parent b2d8f37d72
commit e3f16cf723
1 changed files with 2 additions and 2 deletions

View File

@ -474,9 +474,9 @@ main(void)
fd = open("/dev/ttyS0", O_RDONLY);
ioctl(fd, TIOCMGET, &serial);
if (serial & TIOCM_DTR)
puts("TIOCM_DTR is not set");
else
puts("TIOCM_DTR is set");
else
puts("TIOCM_DTR is not set");
close(fd);
}
.fi