diff options
author | Christian Pointner <equinox@helsinki.at> | 2009-11-14 00:16:16 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2009-11-14 00:16:16 (GMT) |
commit | a5e4a809402eb929e55072573a176d8c2ed44712 (patch) | |
tree | 88ada41b94d9a74949202bcce4c839cc63d6ab8b /switchctl.c | |
parent | df4967d2f9d158711038c054aa0edf543d21e8d3 (diff) |
added baudrate parameter
Diffstat (limited to 'switchctl.c')
-rw-r--r-- | switchctl.c | 5 |
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 |