diff options
author | Christian Pointner <equinox@helsinki.at> | 2015-07-26 23:48:27 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2015-07-26 23:48:27 (GMT) |
commit | 045bad921d4051650976be56aee1f0b7ba6a98b8 (patch) | |
tree | 8a58e144246532f4a3b6a0195e9b65f9d3e1b734 | |
parent | bd63d4305e9b63efc178290893194727b82765f2 (diff) |
improved error handling at heartbeatclient
-rw-r--r-- | src/heartbeatclient.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/heartbeatclient.c b/src/heartbeatclient.c index 6861050..975581f 100644 --- a/src/heartbeatclient.c +++ b/src/heartbeatclient.c @@ -380,8 +380,10 @@ int main(int argc, char* argv[]) ret = 3; else { serial_fd = open(opt.serial_dev_, O_RDWR | O_NOCTTY); - if(serial_fd < 0) + if(serial_fd < 0) { + log_printf(ERROR, "open(%s): %s", opt.serial_dev_, strerror(errno)); ret = 2; + } else { ret = setup_tty(serial_fd, opt.baudrate_); if(ret) |