From: Joel Holdsworth Date: Sat, 11 Feb 2012 17:41:22 +0000 (+0000) Subject: fx2lafw: Implemented hw_get_status X-Git-Tag: libsigrok-0.1.0~97 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=aae2fed675fc63aae58569a03c71201dc449344b;p=libsigrok.git fx2lafw: Implemented hw_get_status --- diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 71d03e1d..a883406c 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -212,8 +212,13 @@ static void *hw_dev_info_get(int device_index, int device_info_id) static int hw_dev_status_get(int device_index) { - (void)device_index; - return SR_ST_NOT_FOUND; + const struct sr_dev_inst *const sdi = + sr_dev_inst_get(device_instances, device_index); + + if (!sdi) + return SR_ST_NOT_FOUND; + + return sdi->status; } static int *hw_hwcap_get_all(void)