X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=device.c;h=90c9fc349449d0e0e183cddf1e333adecd1b687c;hp=cfd456609f30bf63ec333d9d178cb4eb580e5958;hb=a8b4041ad4829aeb33e243d6a6a0c482be4658cd;hpb=55de58a2b9ea6673d30e7250b60fa36953e0447a diff --git a/device.c b/device.c index cfd4566..90c9fc3 100644 --- a/device.c +++ b/device.c @@ -23,8 +23,6 @@ #include extern struct sr_context *sr_ctx; -extern gchar *opt_drv; -extern gchar *opt_probe_group; /* Convert driver options hash to GSList of struct sr_config. */ static GSList *hash_to_hwopt(GHashTable *hash) @@ -116,23 +114,23 @@ GSList *device_scan(void) return devices; } -struct sr_probe_group *select_probe_group(struct sr_dev_inst *sdi) +struct sr_channel_group *select_channel_group(struct sr_dev_inst *sdi) { - struct sr_probe_group *pg; + struct sr_channel_group *cg; GSList *l; - if (!opt_probe_group) + if (!opt_channel_group) return NULL; - if (!sdi->probe_groups) { - g_critical("This device does not have any probe groups."); + if (!sdi->channel_groups) { + g_critical("This device does not have any channel groups."); return NULL; } - for (l = sdi->probe_groups; l; l = l->next) { - pg = l->data; - if (!strcasecmp(opt_probe_group, pg->name)) { - return pg; + for (l = sdi->channel_groups; l; l = l->next) { + cg = l->data; + if (!strcasecmp(opt_channel_group, cg->name)) { + return cg; } }