summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;