X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Foutput%2Fsrzip.c;h=e52fec875fbc9031e384622c29e683fd78eb86ec;hb=9380ec2f05e67518b1b23057749df3684a0cf05e;hp=690736c8f15c1425ed897a2976157a0a1798dcf8;hpb=37875f7506143d97f44014260f07e6408ee8c9dc;p=libsigrok.git diff --git a/src/output/srzip.c b/src/output/srzip.c index 690736c8..e52fec87 100644 --- a/src/output/srzip.c +++ b/src/output/srzip.c @@ -24,7 +24,7 @@ #include #include #include -#include "libsigrok.h" +#include #include "libsigrok-internal.h" #define LOG_PREFIX "output/srzip" @@ -41,14 +41,14 @@ static int init(struct sr_output *o, GHashTable *options) (void)options; - outc = g_malloc0(sizeof(struct out_context)); - o->priv = outc; - if (strlen(o->filename) == 0) { sr_info("srzip output module requires a file name, cannot save."); return SR_ERR_ARG; } + + outc = g_malloc0(sizeof(struct out_context)); outc->filename = g_strdup(o->filename); + o->priv = outc; return SR_OK; } @@ -96,7 +96,7 @@ static int zip_create(const struct sr_output *o) close(tmpfile); meta = g_fopen(metafile, "wb"); fprintf(meta, "[global]\n"); - fprintf(meta, "sigrok version = %s\n", PACKAGE_VERSION); + fprintf(meta, "sigrok version = %s\n", SR_PACKAGE_VERSION_STRING); fprintf(meta, "[device 1]\ncapturefile = logic-1\n"); fprintf(meta, "total probes = %d\n", g_slist_length(o->sdi->channels)); s = sr_samplerate_string(outc->samplerate); @@ -317,6 +317,7 @@ SR_PRIV struct sr_output_module output_srzip = { .name = "srzip", .desc = "srzip session file", .exts = (const char*[]){"sr", NULL}, + .flags = SR_OUTPUT_INTERNAL_IO_HANDLING, .options = get_options, .init = init, .receive = receive,