summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2009-11-10 11:01:13 (GMT)
committerChristian Pointner <equinox@helsinki.at>2009-11-10 11:01:13 (GMT)
commit4b0543607291e787aca8f3eba764142a30cfdbc9 (patch)
treeda41c6ea7bbfaa2f7b5cc0d0385d1ca5bb073470 /utils.c
parent42859848ad81cf0a55d80b6b3a3c9bed550bd6a5 (diff)
added baud rate parameter to setup_tty
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils.c b/utils.c
index 14d4670..6e786cf 100644
--- a/utils.c
+++ b/utils.c
@@ -117,7 +117,7 @@ int nonblock_recvline(read_buffer_t* buffer, int fd, cmd_t** cmd_q, client_t* cl
return ret;
}
-int setup_tty(int fd)
+int setup_tty(int fd, speed_t speed)
{
struct termios tmio;
@@ -127,13 +127,13 @@ int setup_tty(int fd)
return ret;
}
- ret = cfsetospeed(&tmio, B9600);
+ ret = cfsetospeed(&tmio, speed);
if(ret) {
log_printf(ERROR, "Error on cfsetospeed(): %s", strerror(errno));
return ret;
}
- ret = cfsetispeed(&tmio, B9600);
+ ret = cfsetispeed(&tmio, speed);
if(ret) {
log_printf(ERROR, "Error on cfsetispeed(): %s", strerror(errno));
return ret;