mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Simplify the tty test.
This commit is contained in:
@@ -251,7 +251,7 @@ bool CSerialController::open()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (::isatty(m_fd) == 1) {
|
if (::isatty(m_fd)) {
|
||||||
termios termios;
|
termios termios;
|
||||||
if (::tcgetattr(m_fd, &termios) < 0) {
|
if (::tcgetattr(m_fd, &termios) < 0) {
|
||||||
LogError("Cannot get the attributes for %s", m_device.c_str());
|
LogError("Cannot get the attributes for %s", m_device.c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user