summaryrefslogtreecommitdiff
path: root/switchctl.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2009-11-14 00:16:16 (GMT)
committerChristian Pointner <equinox@helsinki.at>2009-11-14 00:16:16 (GMT)
commita5e4a809402eb929e55072573a176d8c2ed44712 (patch)
tree88ada41b94d9a74949202bcce4c839cc63d6ab8b /switchctl.c
parentdf4967d2f9d158711038c054aa0edf543d21e8d3 (diff)
added baudrate parameter
Diffstat (limited to 'switchctl.c')
-rw-r--r--switchctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/switchctl.c b/switchctl.c
index c04d5b8..b3cc643 100644
--- a/switchctl.c
+++ b/switchctl.c
@@ -732,6 +732,9 @@ int main(int argc, char* argv[])
if(ret == -4) {
fprintf(stderr, "syntax error: channel name must be either main or music\n");
}
+ if(ret == -5) {
+ fprintf(stderr, "syntax error: invalid baudrate\n");
+ }
if(ret != -2)
options_print_usage();
@@ -823,7 +826,7 @@ int main(int argc, char* argv[])
if(switch_fd < 0)
ret = 2;
else {
- ret = setup_tty(switch_fd, B19200);
+ ret = setup_tty(switch_fd, opt.baudrate_);
if(ret)
ret = 2;
else