]> sigrok.org Git - libsigrok.git/blobdiff - src/input/csv.c
input: Added preferred file extension field
[libsigrok.git] / src / input / csv.c
index b2756fa0aa124453dd266b2373896d2d06b37d21..e89f99aa6852ed02be46c3bbea4f835292375ebc 100644 (file)
@@ -393,7 +393,7 @@ static int init(struct sr_input *in, GHashTable *options)
        struct context *inc;
        const char *s;
 
-       in->sdi = sr_dev_inst_new();
+       in->sdi = g_malloc0(sizeof(struct sr_dev_inst));
        in->priv = inc = g_malloc0(sizeof(struct context));
 
        inc->single_column = g_variant_get_int32(g_hash_table_lookup(options, "single-column"));
@@ -819,6 +819,7 @@ SR_PRIV struct sr_input_module input_csv = {
        .id = "csv",
        .name = "CSV",
        .desc = "Comma-separated values",
+       .exts = (const char*[]){"csv", NULL},
        .metadata = { SR_INPUT_META_MIMETYPE },
        .options = get_options,
        .format_match = format_match,