}
}
- fmtargs = parse_generic_arg(opt_output_format, TRUE);
+ fmtargs = parse_generic_arg(opt_output_format, TRUE, NULL);
fmtspec = g_hash_table_lookup(fmtargs, "sigrok_key");
if (!fmtspec)
g_critical("Invalid output format.");
g_hash_table_remove(fmtargs, "sigrok_key");
if ((options = sr_output_options_get(omod))) {
fmtopts = generic_arg_to_opt(options, fmtargs);
+ (void)warn_unknown_keys(options, fmtargs, NULL);
sr_output_options_free(options);
- } else
+ } else {
fmtopts = NULL;
+ }
o = sr_output_new(omod, fmtopts, sdi, opt_output_file);
if (opt_output_file) {
*outfile = NULL;
}
} else {
+ setup_binary_stdout();
*outfile = stdout;
}
GHashTable *fmtargs, *fmtopts;
char *fmtspec;
- fmtargs = parse_generic_arg(opt_transform_module, TRUE);
+ fmtargs = parse_generic_arg(opt_transform_module, TRUE, NULL);
fmtspec = g_hash_table_lookup(fmtargs, "sigrok_key");
if (!fmtspec)
g_critical("Invalid transform module.");
g_hash_table_remove(fmtargs, "sigrok_key");
if ((options = sr_transform_options_get(tmod))) {
fmtopts = generic_arg_to_opt(options, fmtargs);
+ (void)warn_unknown_keys(options, fmtargs, NULL);
sr_transform_options_free(options);
- } else
+ } else {
fmtopts = NULL;
+ }
t = sr_transform_new(tmod, fmtopts, sdi);
if (fmtopts)
g_hash_table_destroy(fmtopts);
g_critical("Failed to configure decode session.");
break;
}
+ pd_samplerate = samplerate;
}
if (srd_session_start(srd_sess) != SRD_OK) {
g_critical("Failed to start decode session.");
g_variant_new_uint64(samplerate)) != SRD_OK) {
g_critical("Failed to pass samplerate to decoder.");
}
+ pd_samplerate = samplerate;
}
#endif
break;
while (g_hash_table_iter_next(&iter, &key, &value)) {
if ((ret = opt_to_gvar(key, value, &src)) != 0)
return ret;
- cg = select_channel_group(sdi);
+ cg = lookup_channel_group(sdi);
if ((ret = maybe_config_set(sr_dev_inst_driver_get(sdi), sdi, cg,
src.key, src.data)) != SR_OK) {
g_critical("Failed to set device option '%s': %s.",
}
if (opt_config) {
- if ((devargs = parse_generic_arg(opt_config, FALSE))) {
+ if ((devargs = parse_generic_arg(opt_config, FALSE, NULL))) {
if (set_dev_options(sdi, devargs) != SR_OK)
return;
g_hash_table_destroy(devargs);