When sigrok-cli fails to set a config option it doesn't indicate
the actual error as opposed to --get. Print the error message in
both cases.
Signed-off-by: Bartosz Golaszewski <redacted>
cg = select_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'.", (char *)key);
+ g_critical("Failed to set device option '%s': %s.",
+ (char *)key, sr_strerror(ret));
return ret;
}
}