From: Bert Vermeulen Date: Fri, 25 Jan 2013 19:42:43 +0000 (+0100) Subject: Use sr_dev_has_option() where appropriate. X-Git-Tag: sigrok-cli-0.4.0~36 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e4ffb9d69985320cd0a13f5643a13a181527734d;p=sigrok-cli.git Use sr_dev_has_option() where appropriate. --- diff --git a/sigrok-cli.c b/sigrok-cli.c index df8236e..6512ff7 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -1312,7 +1312,7 @@ static int set_limit_time(const struct sr_dev_inst *sdi) return SR_ERR; } - if (sr_driver_hwcap_exists(sdi->driver, SR_CONF_LIMIT_MSEC)) { + if (sr_dev_has_option(sdi, SR_CONF_LIMIT_MSEC)) { if (sr_config_set(sdi, SR_CONF_LIMIT_MSEC, &time_msec) != SR_OK) { g_critical("Failed to configure time limit."); sr_session_destroy(); @@ -1404,7 +1404,7 @@ static void run_session(void) } if (opt_continuous) { - if (!sr_driver_hwcap_exists(sdi->driver, SR_CONF_CONTINUOUS)) { + if (!sr_dev_has_option(sdi, SR_CONF_CONTINUOUS)) { g_critical("This device does not support continuous sampling."); sr_session_destroy(); return;