int i;
if (opt_drv) {
+ /* Caller specified driver. Use it. Only this one. */
if (!parse_driver(opt_drv, &driver, &drvopts))
return NULL;
devices = sr_driver_scan(driver, drvopts);
g_slist_free_full(drvopts, (GDestroyNotify)free_drvopts);
+ } else if (opt_dont_scan) {
+ /* No -d choice, and -D "don't scan" requested. Do nothing. */
+ devices = NULL;
} else {
- /* No driver specified, let them all scan on their own. */
+ /* No driver specified. Scan all available drivers. */
devices = NULL;
drivers = sr_driver_list(sr_ctx);
for (i = 0; drivers[i]; i++) {
.sp
.RB " $ " "sigrok\-cli \-\-driver=uni\-t\-ut61e:conn=4.6" " [...]"
.TP
+.B "\-D, \-\-dont\-scan"
+Do not automatically scan for device drivers in the absence of a
+.BR "\-d " ( "\-\-driver" )
+specification.
+.TP
.BR "\-c, \-\-config " <deviceoption>
A colon-separated list of device options, where each option takes the form
.BR key=value .
gboolean opt_list_supported_wiki = FALSE;
gint opt_loglevel = SR_LOG_WARN; /* Show errors+warnings by default. */
gboolean opt_scan_devs = FALSE;
+gboolean opt_dont_scan = FALSE;
gboolean opt_wait_trigger = FALSE;
gchar *opt_input_file = NULL;
gchar *opt_output_file = NULL;
#endif
{"scan", 0, 0, G_OPTION_ARG_NONE, &opt_scan_devs,
"Scan for devices", NULL},
+ {"dont-scan", 'D', 0, G_OPTION_ARG_NONE, &opt_dont_scan,
+ "Don't auto-scan (use -d spec only)", NULL},
{"show", 0, 0, G_OPTION_ARG_NONE, &opt_show,
"Show device/format/decoder details", NULL},
{"time", 0, 0, G_OPTION_ARG_CALLBACK, &check_opt_time,
extern gboolean opt_list_supported_wiki;
extern gint opt_loglevel;
extern gboolean opt_scan_devs;
+extern gboolean opt_dont_scan;
extern gboolean opt_wait_trigger;
extern gchar *opt_input_file;
extern gchar *opt_output_file;