From: Bert Vermeulen Date: Mon, 11 Mar 2013 14:32:45 +0000 (+0100) Subject: dump obsolete multiple-device leftover code X-Git-Tag: sigrok-cli-0.4.0~31 X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=commitdiff_plain;h=41d7fb2343dc765fa34ffa661ee19c20c93eff9a dump obsolete multiple-device leftover code --- diff --git a/sigrok-cli.c b/sigrok-cli.c index 24fef94..a6db4f5 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -314,22 +314,12 @@ static void show_dev_detail(void) num_devices = g_slist_length(devices); if (num_devices > 1) { - if (!opt_dev) { - g_critical("%d devices found. Use --list-devices to show them, " - "and --device to select one.", num_devices); - return; - } - /* opt_dev is NULL if not specified, which is fine. */ - n = strtol(opt_dev, NULL, 10); - if (n >= num_devices) { - g_critical("%d devices found, numbered starting from 0.", - num_devices); - return; - } - sdi = g_slist_nth_data(devices, n); - } else - sdi = g_slist_nth_data(devices, 0); + g_critical("%d devices found. Use --list-devices to show them, " + "and --device to select one.", num_devices); + return; + } + sdi = devices->data; print_dev_line(sdi); if (sr_config_list(sdi->driver, SR_CONF_TRIGGER_TYPE, (const void **)&charopts,