]> sigrok.org Git - sigrok-util.git/commitdiff
new-driver: Use new SR_ERR etc. macros.
authorUwe Hermann <redacted>
Wed, 24 Oct 2012 10:02:07 +0000 (12:02 +0200)
committerUwe Hermann <redacted>
Wed, 24 Oct 2012 10:02:07 +0000 (12:02 +0200)
source/drv-api.c

index 66b24e8ff7133b040cb8d4ba5bbf60f802b5111a..16f5f6d2e74f9a6870e58ef6ddeab2f32f77fa3a 100644 (file)
@@ -56,7 +56,7 @@ static int hw_init(void)
        struct drv_context *drvc;
 
        if (!(drvc = g_try_malloc0(sizeof(struct drv_context)))) {
        struct drv_context *drvc;
 
        if (!(drvc = g_try_malloc0(sizeof(struct drv_context)))) {
-               sr_err("${short}: Driver context malloc failed.");
+               SR_ERR("Driver context malloc failed.");
                return SR_ERR;
        }
 
                return SR_ERR;
        }
 
@@ -121,7 +121,7 @@ static int hw_info_get(int info_id, const void **data,
        switch (info_id) {
        /* TODO */
        default:
        switch (info_id) {
        /* TODO */
        default:
-               sr_err("${short}: Unknown info_id: %d.", info_id);
+               SR_ERR("Unknown info_id: %d.", info_id);
                return SR_ERR_ARG;
        }
 
                return SR_ERR_ARG;
        }
 
@@ -134,7 +134,7 @@ static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
        int ret;
 
        if (sdi->status != SR_ST_ACTIVE) {
        int ret;
 
        if (sdi->status != SR_ST_ACTIVE) {
-               sr_err("${short}: Device inactive, can't set config options.");
+               SR_ERR("Device inactive, can't set config options.");
                return SR_ERR;
        }
 
                return SR_ERR;
        }
 
@@ -142,7 +142,7 @@ static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
        switch (hwcap) {
        /* TODO */
        default:
        switch (hwcap) {
        /* TODO */
        default:
-               sr_err("${short}: Unknown hardware capability: %d.", hwcap);
+               SR_ERR("Unknown hardware capability: %d.", hwcap);
                ret = SR_ERR_ARG;
        }
 
                ret = SR_ERR_ARG;
        }
 
@@ -163,7 +163,7 @@ static int hw_dev_acquisition_stop(const struct sr_dev_inst *sdi,
        (void)cb_data;
 
        if (sdi->status != SR_ST_ACTIVE) {
        (void)cb_data;
 
        if (sdi->status != SR_ST_ACTIVE) {
-               sr_err("${short}: Device inactive, can't stop acquisition.");
+               sr_err("Device inactive, can't stop acquisition.");
                return SR_ERR;
        }
 
                return SR_ERR;
        }