From: Bert Vermeulen Date: Sun, 23 Aug 2015 21:20:40 +0000 (+0200) Subject: Use new sr_key_info instead of sr_config_info. X-Git-Tag: sigrok-cli-0.6.0~21 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e4e4b4724b27addf14b827314104295e4125396a;p=sigrok-cli.git Use new sr_key_info instead of sr_config_info. --- diff --git a/main.c b/main.c index a53566e..1706510 100644 --- 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))) diff --git a/session.c b/session.c index f51bb64..b36072c 100644 --- 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 aec61f1..e81110a 100644 --- 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) {