]> sigrok.org Git - libsigrok.git/commitdiff
std: Fix caller prefix output.
authorBert Vermeulen <redacted>
Tue, 21 Jan 2014 13:03:27 +0000 (14:03 +0100)
committerBert Vermeulen <redacted>
Tue, 21 Jan 2014 13:03:27 +0000 (14:03 +0100)
std.c

diff --git a/std.c b/std.c
index 93ca942501fd3611a43d45d553d20cfe5ad03c86..30b8d1d4b2f668d4dce56de5550463487d0b00de 100644 (file)
--- a/std.c
+++ b/std.c
@@ -50,12 +50,12 @@ SR_PRIV int std_init(struct sr_context *sr_ctx, struct sr_dev_driver *di,
        struct drv_context *drvc;
 
        if (!di) {
-               sr_err("%sInvalid driver, cannot initialize.", prefix);
+               sr_err("%sInvalid driver, cannot initialize.", prefix);
                return SR_ERR_ARG;
        }
 
        if (!(drvc = g_try_malloc(sizeof(struct drv_context)))) {
-               sr_err("%sDriver context malloc failed.", prefix);
+               sr_err("%sDriver context malloc failed.", prefix);
                return SR_ERR_MALLOC;
        }
 
@@ -91,17 +91,17 @@ SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi,
                return SR_ERR_ARG;
        }
 
-       sr_dbg("%sStarting acquisition.", prefix);
+       sr_dbg("%sStarting acquisition.", prefix);
 
        /* Send header packet to the session bus. */
-       sr_dbg("%sSending SR_DF_HEADER packet.", prefix);
+       sr_dbg("%sSending SR_DF_HEADER packet.", prefix);
        packet.type = SR_DF_HEADER;
        packet.payload = (uint8_t *)&header;
        header.feed_version = 1;
        gettimeofday(&header.starttime, NULL);
 
        if ((ret = sr_session_send(sdi, &packet)) < 0) {
-               sr_err("%sFailed to send header packet: %d.", prefix, ret);
+               sr_err("%sFailed to send header packet: %d.", prefix, ret);
                return ret;
        }
 
@@ -194,28 +194,28 @@ SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi,
        }
 
        if (sdi->status != SR_ST_ACTIVE) {
-               sr_err("%sDevice inactive, can't stop acquisition.", prefix);
+               sr_err("%sDevice inactive, can't stop acquisition.", prefix);
                return SR_ERR_DEV_CLOSED;
        }
 
-       sr_dbg("%sStopping acquisition.", prefix);
+       sr_dbg("%sStopping acquisition.", prefix);
 
        if ((ret = serial_source_remove(serial)) < 0) {
-               sr_err("%sFailed to remove source: %d.", prefix, ret);
+               sr_err("%sFailed to remove source: %d.", prefix, ret);
                return ret;
        }
 
        if ((ret = dev_close_fn(sdi)) < 0) {
-               sr_err("%sFailed to close device: %d.", prefix, ret);
+               sr_err("%sFailed to close device: %d.", prefix, ret);
                return ret;
        }
 
        /* Send SR_DF_END packet to the session bus. */
-       sr_dbg("%sSending SR_DF_END packet.", prefix);
+       sr_dbg("%sSending SR_DF_END packet.", prefix);
        packet.type = SR_DF_END;
        packet.payload = NULL;
        if ((ret = sr_session_send(cb_data, &packet)) < 0) {
-               sr_err("%sFailed to send SR_DF_END packet: %d.", prefix, ret);
+               sr_err("%sFailed to send SR_DF_END packet: %d.", prefix, ret);
                return ret;
        }