summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-07-26 23:24:23 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-07-26 23:24:23 (GMT)
commit6dba9c937d5b6789136495e8f22bc795621b1a81 (patch)
tree0c2ef4f6fe07213170e942208b07fff40552bf7f /src
parent7fd5f19cdde5e55775207ae95487b810785d1388 (diff)
improved error handling at switchctl
Diffstat (limited to 'src')
-rw-r--r--src/switchctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/switchctl.c b/src/switchctl.c
index 1015185..a06912a 100644
--- a/src/switchctl.c
+++ b/src/switchctl.c
@@ -1120,9 +1120,10 @@ int main(int argc, char* argv[])
int switch_fd = 0;
for(;;) {
switch_fd = open(opt.switch_dev_, O_RDWR | O_NOCTTY);
- if(switch_fd < 0)
+ if(switch_fd < 0) {
+ log_printf(ERROR, "open(%s): %s", opt.switch_dev_, strerror(errno));
ret = 2;
- else {
+ } else {
ret = setup_tty(switch_fd, opt.baudrate_);
if(ret)
ret = 2;