From: Gerhard Sittig Date: Tue, 28 Aug 2018 16:18:37 +0000 (+0200) Subject: fx2lafw: silence error message in query for channel group's device options X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4be5746d1dd2796aa10f0c45440005d28a554901;p=libsigrok.git fx2lafw: silence error message in query for channel group's device options The fx2lafw(4) driver supports mere logic analyzers as well as mixed signal devices, but does not support channel group specific device options. Avoid an error message when channel group device options get queried, the condition is perfectly legal and non-fatal. How to reproduce: $ pulseview -d fx2lafw $ sigrok-cli -d fx2lafw -g Logic --show This fixes bug #1267. --- diff --git a/src/hardware/fx2lafw/api.c b/src/hardware/fx2lafw/api.c index e0a11a5b..dc085266 100644 --- a/src/hardware/fx2lafw/api.c +++ b/src/hardware/fx2lafw/api.c @@ -541,6 +541,8 @@ static int config_list(uint32_t key, GVariant **data, switch (key) { case SR_CONF_SCAN_OPTIONS: case SR_CONF_DEVICE_OPTIONS: + if (cg) + return SR_ERR_NA; return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts); case SR_CONF_SAMPLERATE: if (!devc)