From 41d7fb2343dc765fa34ffa661ee19c20c93eff9a Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Mon, 11 Mar 2013 15:32:45 +0100 Subject: [PATCH] dump obsolete multiple-device leftover code --- sigrok-cli.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) 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, -- 2.30.2