]> sigrok.org Git - libsigrok.git/blobdiff - output/output_text.c
Allow output_format.init() to return errors.
[libsigrok.git] / output / output_text.c
index 0507e02c51262948b09c066e7c4c2d1b96b3a0a4..914e51fc97977086d6a799e4df4170b62dde7a43 100644 (file)
@@ -66,7 +66,7 @@ static void flush_linebufs(struct context *ctx, GSList *probes, char *outbuf)
 }
 
 
-static void init(struct output *o, int default_spl)
+static int init(struct output *o, int default_spl)
 {
        struct context *ctx;
        struct probe *probe;
@@ -109,6 +109,7 @@ static void init(struct output *o, int default_spl)
        ctx->linebuf = calloc(1, num_probes * ctx->linebuf_len);
        ctx->linevalues = calloc(1, num_probes);
 
+       return 0;
 }
 
 
@@ -137,10 +138,10 @@ static int event(struct output *o, int event_type, char **data_out, uint64_t *le
 }
 
 
-static void init_binary(struct output *o)
+static int init_binary(struct output *o)
 {
 
-       init(o, DEFAULT_BPL_BIN);
+       return init(o, DEFAULT_BPL_BIN);
 
 }
 
@@ -199,10 +200,10 @@ static int data_binary(struct output *o, char *data_in, uint64_t length_in, char
 }
 
 
-static void init_hex(struct output *o)
+static int init_hex(struct output *o)
 {
 
-       init(o, DEFAULT_BPL_BIN);
+       return init(o, DEFAULT_BPL_BIN);
 
 }