summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_serial.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/io_serial.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_serial.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/io_serial.cpp b/noncore/apps/opie-console/io_serial.cpp
index b89a53b..cc63c58 100644
--- a/noncore/apps/opie-console/io_serial.cpp
+++ b/noncore/apps/opie-console/io_serial.cpp
@@ -43,12 +43,13 @@ void IOSerial::close() {
43bool IOSerial::open() { 43bool IOSerial::open() {
44 if (!m_fd) { 44 if (!m_fd) {
45 struct termios tty; 45 struct termios tty;
46 m_fd = ::open(m_device, O_RDWR | O_NOCTTY | O_NONBLOCK); 46 m_fd = ::open(m_device, O_RDWR | O_NOCTTY | O_NONBLOCK);
47 if (m_fd < 0) { 47 if (m_fd < 0) {
48 emit error(CouldNotOpen, strerror(errno)); 48 emit error(CouldNotOpen, strerror(errno));
49 m_fd = 0;
49 return FALSE; 50 return FALSE;
50 } 51 }
51 tcgetattr(m_fd, &tty); 52 tcgetattr(m_fd, &tty);
52 53
53 /* Baud rate */ 54 /* Baud rate */
54 int speed = baud(m_baud); 55 int speed = baud(m_baud);