From: Bert Vermeulen Date: Sat, 2 Nov 2013 21:43:32 +0000 (+0100) Subject: Report probe groups with --show X-Git-Tag: sigrok-cli-0.5.0~76 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=96e0e4500717f3e09e6c9bae3f1f10967c8d6535;p=sigrok-cli.git Report probe groups with --show --- diff --git a/sigrok-cli.c b/sigrok-cli.c index 61cd1e4..2ae593f 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -336,7 +336,9 @@ static void show_dev_detail(void) { struct sr_dev_inst *sdi; const struct sr_config_info *srci; - GSList *devices; + struct sr_probe *probe; + struct sr_probe_group *probe_group; + GSList *devices, *pgl, *prl; GVariant *gvar_opts, *gvar_dict, *gvar_list, *gvar; gsize num_opts, num_elements; const uint64_t *uint64, p, q, low, high; @@ -385,6 +387,19 @@ static void show_dev_detail(void) /* Driver supports no device instance options. */ return; + if (sdi->probe_groups) { + printf("Probe groups:\n"); + for (pgl = sdi->probe_groups; pgl; pgl = pgl->next) { + probe_group = pgl->data; + printf(" %s:", probe_group->name); + for (prl = probe_group->probes; prl; prl = prl->next) { + probe = prl->data; + printf(" %s", probe->name); + } + printf("\n"); + } + } + printf("Supported configuration options:\n"); opts = g_variant_get_fixed_array(gvar_opts, &num_opts, sizeof(int32_t)); for (o = 0; o < num_opts; o++) {