summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-07-26 23:35:55 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-07-26 23:35:55 (GMT)
commitbd63d4305e9b63efc178290893194727b82765f2 (patch)
treefd22df311f9f20662215295015d335bafd7a2e4e /src
parent6dba9c937d5b6789136495e8f22bc795621b1a81 (diff)
improved error handling at serialclient
Diffstat (limited to 'src')
-rw-r--r--src/serialclient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/serialclient.c b/src/serialclient.c
index 6ebbafb..caafbbb 100644
--- a/src/serialclient.c
+++ b/src/serialclient.c
@@ -239,8 +239,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)