]> sigrok.org Git - sigrok-cli.git/commitdiff
dump obsolete multiple-device leftover code
authorBert Vermeulen <redacted>
Mon, 11 Mar 2013 14:32:45 +0000 (15:32 +0100)
committerBert Vermeulen <redacted>
Mon, 11 Mar 2013 14:32:45 +0000 (15:32 +0100)
sigrok-cli.c

index 24fef94d05c396c346ae94e4220496f8c1b4f738..a6db4f5ddc3cba15e47d933dd2964aa10c073497 100644 (file)
@@ -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,