]> sigrok.org Git - libsigrok.git/commitdiff
demo: scan/info_get fixes
authorBert Vermeulen <redacted>
Sun, 15 Jul 2012 02:07:51 +0000 (04:07 +0200)
committerBert Vermeulen <redacted>
Fri, 3 Aug 2012 08:27:39 +0000 (10:27 +0200)
hardware/demo/demo.c

index f5e0f3ac084a2a9437f2627ef498132ce36cc1dc..9c0e432d4f04b06657743e48819be7ff474c9b35 100644 (file)
@@ -162,6 +162,7 @@ static GSList *hw_scan(GSList *options)
                sr_err("demo: %s: sr_dev_inst_new failed", __func__);
                return 0;
        }
+       sdi->driver = ddi;
 
        devices = g_slist_append(devices, sdi);
        ddi->instances = g_slist_append(ddi->instances, sdi);
@@ -218,6 +219,8 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_PATTERNS:
                *data = &pattern_strings;
                break;
+       default:
+               return SR_ERR_ARG;
        }
 
        return SR_OK;