Use new sr_key_info instead of sr_config_info.
authorBert Vermeulen <bert@biot.com>
Sun, 23 Aug 2015 21:20:40 +0000 (23:20 +0200)
committerBert Vermeulen <bert@biot.com>
Sun, 23 Aug 2015 21:20:40 +0000 (23:20 +0200)
main.c
session.c
show.c

diff --git a/main.c b/main.c
index a53566e8960b31b24ce3b89e6e68edd5b62e841d..17065101af2bfcbe96ec75e36eabd91d98e532ab 100644 (file)
--- a/main.c
+++ b/main.c
@@ -136,7 +136,7 @@ static void get_option(void)
 {
        struct sr_dev_inst *sdi;
        struct sr_channel_group *cg;
-       const struct sr_config_info *ci;
+       const struct sr_key_info *ci;
        GSList *devices;
        GVariant *gvar;
        GHashTable *devargs;
@@ -159,7 +159,7 @@ static void get_option(void)
        }
 
        cg = select_channel_group(sdi);
-       if (!(ci = sr_config_info_name_get(opt_get)))
+       if (!(ci = sr_key_info_name_get(SR_KEY_CONFIG, opt_get)))
                g_critical("Unknown option '%s'", opt_get);
 
        if ((devargs = parse_generic_arg(opt_config, FALSE)))
index f51bb642aad35149972029991210d906ed3e26f8..b36072cf7e0289f29cdc5f8a585a4a04ca2a090e 100644 (file)
--- a/session.c
+++ b/session.c
@@ -354,7 +354,7 @@ void datafeed_in(const struct sr_dev_inst *sdi,
 
 int opt_to_gvar(char *key, char *value, struct sr_config *src)
 {
-       const struct sr_config_info *srci;
+       const struct sr_key_info *srci;
        double tmp_double, dlow, dhigh;
        uint64_t tmp_u64, p, q, low, high;
        GVariant *rational[2], *range[2];
@@ -363,7 +363,7 @@ int opt_to_gvar(char *key, char *value, struct sr_config *src)
        gchar **keyval;
        int ret;
 
-       if (!(srci = sr_config_info_name_get(key))) {
+       if (!(srci = sr_key_info_name_get(SR_KEY_CONFIG, key))) {
                g_critical("Unknown device option '%s'.", (char *) key);
                return -1;
        }
diff --git a/show.c b/show.c
index aec61f142d7aff4a90a38e32a4b80ad56fb45f2d..e81110a5eb5ec9f8ebbeb7774dc4bae6d738b3ec 100644 (file)
--- a/show.c
+++ b/show.c
@@ -223,7 +223,7 @@ void show_dev_list(void)
 
 void show_drv_detail(struct sr_dev_driver *driver)
 {
-       const struct sr_config_info *srci;
+       const struct sr_key_info *srci;
        GVariant *gvar_opts;
        const uint32_t *opts;
        gsize num_elements, i;
@@ -235,7 +235,7 @@ void show_drv_detail(struct sr_dev_driver *driver)
                if (num_elements) {
                        printf("Driver functions:\n");
                        for (i = 0; i < num_elements; i++) {
-                               if (!(srci = sr_config_info_get(opts[i] & SR_CONF_MASK)))
+                               if (!(srci = sr_key_info_get(SR_KEY_CONFIG, opts[i] & SR_CONF_MASK)))
                                        continue;
                                printf("    %s\n", srci->name);
                        }
@@ -250,7 +250,7 @@ void show_drv_detail(struct sr_dev_driver *driver)
                if (num_elements) {
                        printf("Scan options:\n");
                        for (i = 0; i < num_elements; i++) {
-                               if (!(srci = sr_config_info_get(opts[i] & SR_CONF_MASK)))
+                               if (!(srci = sr_key_info_get(SR_KEY_CONFIG, opts[i] & SR_CONF_MASK)))
                                        continue;
                                printf("    %s\n", srci->id);
                        }
@@ -345,7 +345,7 @@ void show_dev_detail(void)
        opts = g_variant_get_fixed_array(gvar_opts, &num_opts, sizeof(uint32_t));
        for (o = 0; o < num_opts; o++) {
                key = opts[o] & SR_CONF_MASK;
-               if (!(srci = sr_config_info_get(key)))
+               if (!(srci = sr_key_info_get(SR_KEY_CONFIG, key)))
                        continue;
 
                if (key == SR_CONF_TRIGGER_MATCH) {