]> sigrok.org Git - sigrok-cli.git/commitdiff
Update API calls due to recent libsigrok renames.
authorUwe Hermann <redacted>
Thu, 31 Dec 2015 17:55:29 +0000 (18:55 +0100)
committerUwe Hermann <redacted>
Thu, 31 Dec 2015 17:55:29 +0000 (18:55 +0100)
 - sr_driver_scan_options() -> sr_driver_scan_options_list()

 - sr_dev_config_capabilities() -> sr_dev_config_capabilities_list()

main.c
session.c
show.c

diff --git a/main.c b/main.c
index 43050962fa7f94e598ee9fe1b2d7028913a3bd44..2bb2ef71bb13a95e877a276d346e0e8e41b11264 100644 (file)
--- a/main.c
+++ b/main.c
@@ -78,7 +78,7 @@ int maybe_config_get(struct sr_dev_driver *driver,
                const struct sr_dev_inst *sdi, struct sr_channel_group *cg,
                uint32_t key, GVariant **gvar)
 {
-       if (sr_dev_config_capabilities(sdi, cg, key) & SR_CONF_GET)
+       if (sr_dev_config_capabilities_list(sdi, cg, key) & SR_CONF_GET)
                return sr_config_get(driver, sdi, cg, key, gvar);
 
        return SR_ERR_NA;
@@ -90,7 +90,7 @@ int maybe_config_set(struct sr_dev_driver *driver,
 {
        (void)driver;
 
-       if (sr_dev_config_capabilities(sdi, cg, key) & SR_CONF_SET)
+       if (sr_dev_config_capabilities_list(sdi, cg, key) & SR_CONF_SET)
                return sr_config_set(sdi, cg, key, gvar);
 
        return SR_ERR_NA;
@@ -100,7 +100,7 @@ int maybe_config_list(struct sr_dev_driver *driver,
                const struct sr_dev_inst *sdi, struct sr_channel_group *cg,
                uint32_t key, GVariant **gvar)
 {
-       if (sr_dev_config_capabilities(sdi, cg, key) & SR_CONF_LIST)
+       if (sr_dev_config_capabilities_list(sdi, cg, key) & SR_CONF_LIST)
                return sr_config_list(driver, sdi, cg, key, gvar);
 
        return SR_ERR_NA;
index edf3d12bdae898686c0c8e16123ed01d62f3a422..5e096cd32f39d5e7edc9be45a87f9d8e81ba8f50 100644 (file)
--- a/session.c
+++ b/session.c
@@ -45,14 +45,14 @@ static int set_limit_time(const struct sr_dev_inst *sdi)
                return SR_ERR;
        }
 
-       if (sr_dev_config_capabilities(sdi, NULL, SR_CONF_LIMIT_MSEC)
+       if (sr_dev_config_capabilities_list(sdi, NULL, SR_CONF_LIMIT_MSEC)
                        & SR_CONF_SET) {
                gvar = g_variant_new_uint64(time_msec);
                if (sr_config_set(sdi, NULL, SR_CONF_LIMIT_MSEC, gvar) != SR_OK) {
                        g_critical("Failed to configure time limit.");
                        return SR_ERR;
                }
-       } else if (sr_dev_config_capabilities(sdi, NULL, SR_CONF_SAMPLERATE)
+       } else if (sr_dev_config_capabilities_list(sdi, NULL, SR_CONF_SAMPLERATE)
                        & (SR_CONF_GET | SR_CONF_SET)) {
                /* Convert to samples based on the samplerate. */
                sr_config_get(driver, sdi, NULL, SR_CONF_SAMPLERATE, &gvar);
diff --git a/show.c b/show.c
index 39db85f58cff515abd86b1bc1b40b047c1ba0cd9..54b367c909a98046d11d25b8dc34cb53e6bf73ed 100644 (file)
--- a/show.c
+++ b/show.c
@@ -241,7 +241,7 @@ void show_drv_detail(struct sr_dev_driver *driver)
                g_array_free(opts, TRUE);
        }
 
-       if ((opts = sr_driver_scan_options(driver))) {
+       if ((opts = sr_driver_scan_options_list(driver))) {
                if (opts->len > 0) {
                        printf("Scan options:\n");
                        for (i = 0; i < opts->len; i++) {
@@ -386,7 +386,7 @@ void show_dev_detail(void)
                        g_variant_unref(gvar_list);
 
                } else if (key == SR_CONF_LIMIT_SAMPLES
-                               && (sr_dev_config_capabilities(sdi, NULL, key)
+                               && (sr_dev_config_capabilities_list(sdi, NULL, key)
                                        & SR_CONF_LIST)) {
                        /*
                         * If implemented in config_list(), this denotes the