]> sigrok.org Git - libsigrok.git/blobdiff - output/csv.c
input/output modules: Adjust to GVariant-based sr_config_* functions
[libsigrok.git] / output / csv.c
index e2901efbc8f5205fcff1a5ef2299e3ef47a6a991..844ca4fe8f7aaefe1bf4cff8e8b77eb773b78376 100644 (file)
@@ -60,8 +60,8 @@ static int init(struct sr_output *o)
        struct context *ctx;
        struct sr_probe *probe;
        GSList *l;
+       GVariant *gvar;
        int num_probes;
-       uint64_t *samplerate;
        time_t t;
        unsigned int i;
 
@@ -100,9 +100,9 @@ static int init(struct sr_output *o)
        num_probes = g_slist_length(o->sdi->probes);
 
        if (sr_dev_has_option(o->sdi, SR_CONF_SAMPLERATE)) {
-               o->sdi->driver->config_get(SR_CONF_SAMPLERATE,
-                               (const void **)&samplerate, o->sdi);
-               ctx->samplerate = *samplerate;
+               o->sdi->driver->config_get(SR_CONF_SAMPLERATE, &gvar, o->sdi);
+               ctx->samplerate = g_variant_get_uint64(gvar);
+               g_variant_unref(gvar);
        } else
                ctx->samplerate = 0;