diff options
Diffstat (limited to 'serialclient.c')
-rw-r--r-- | serialclient.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/serialclient.c b/serialclient.c index a32c691..392288a 100644 --- a/serialclient.c +++ b/serialclient.c @@ -146,6 +146,9 @@ int main(int argc, char* argv[]) if(ret == -2) { fprintf(stderr, "memory error on options_parse, exiting\n"); } + if(ret == -5) { + fprintf(stderr, "syntax error: invalid baudrate\n"); + } if(ret != -2) options_print_usage(); @@ -237,7 +240,7 @@ int main(int argc, char* argv[]) if(serial_fd < 0) ret = 2; else { - ret = setup_tty(serial_fd, B38400); + ret = setup_tty(serial_fd, opt.baudrate_); if(ret) ret = 2; else |