]> sigrok.org Git - libsigrok.git/commitdiff
serial: Fix some sr_err() items.
authorUwe Hermann <redacted>
Fri, 2 Nov 2012 17:35:08 +0000 (18:35 +0100)
committerUwe Hermann <redacted>
Fri, 2 Nov 2012 17:35:30 +0000 (18:35 +0100)
hardware/common/serial.c

index 9bf0c18406a091b8da7e9f5312d9a96c8c8024a5..d688f7d1f090cdebd0a0f29b064ef07d30d0d8a7 100644 (file)
@@ -281,7 +281,7 @@ SR_PRIV void *serial_backup_params(int fd)
        /* Returns 0 upon success, -1 upon failure. */
        if (tcgetattr(fd, term) < 0) {
                sr_err("FD %d: Error getting serial parameters: %s.",
-                      strerror(errno));
+                      fd, strerror(errno));
                g_free(term);
                return NULL;
        }
@@ -311,7 +311,7 @@ SR_PRIV int serial_restore_params(int fd, void *backup)
        /* Returns 0 upon success, -1 upon failure. */
        if ((ret = tcsetattr(fd, TCSADRAIN, (struct termios *)backup)) < 0) {
                sr_err("FD %d: Error restoring serial parameters: %s.",
-                      strerror(errno));
+                      fd, strerror(errno));
        }
 
        return ret;