]> git.itanic.dy.fi Git - log-plotter/blobdiff - baud.c
config.c: Export store_str_variable_value_to_array()
[log-plotter] / baud.c
diff --git a/baud.c b/baud.c
index 834974e35fd0750091486c9b446517b612eafb99..0d3805ef48a7d00b9d3d5b0931f3ec26ddfaa8e9 100644 (file)
--- a/baud.c
+++ b/baud.c
@@ -6,6 +6,8 @@
 #include <linux/termios.h>
 #include <unistd.h>
 
+#include "trace.h"
+
 /*
  * HACK: declare the ioctl function by hand...
  *
@@ -33,12 +35,12 @@ int open_at_baud(const char *device, int *baud)
        fd = open(device, O_RDWR | O_NOCTTY | O_NDELAY);
 
        if (fd == -1) {
-               fprintf(stderr, "error opening %s: %m\n",       device);
+               pr_err("error opening %s: %m\n", device);
                return fd;
        }
 
        if (ioctl(fd, TCGETS2, &tios)) {
-               perror("TCGETS2");
+               pr_err("TCGETS2: %m\n");
                goto err;
        }
 
@@ -48,12 +50,12 @@ int open_at_baud(const char *device, int *baud)
        tios.c_ospeed = *baud;
 
        if (ioctl(fd, TCSETS2, &tios)) {
-               perror("TCSETS2");
+               pr_err("TCSETS2: %m");
                goto err;
        }
 
        if (ioctl(fd, TCGETS2, &tios)) {
-               perror("TCGETS2");
+               pr_err("TCGETS2: %m");
                goto err;
        }