From: Bert Vermeulen Date: Thu, 5 Sep 2013 22:30:38 +0000 (+0200) Subject: List dummy "sigrok" file format, and accept it as option X-Git-Tag: sigrok-cli-0.5.0~85 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c25c8e457b4f0ce20000164edb391803d58e4c07;p=sigrok-cli.git List dummy "sigrok" file format, and accept it as option See bug 131 --- diff --git a/sigrok-cli.c b/sigrok-cli.c index 0daf79e..71c35b7 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -252,6 +252,7 @@ static void show_version(void) outputs = sr_output_list(); for (i = 0; outputs[i]; i++) printf(" %-20s %s\n", outputs[i]->id, outputs[i]->description); + printf(" %-20s %s\n", "sigrok", "Default file output format"); printf("\n"); #ifdef HAVE_SRD @@ -1268,6 +1269,13 @@ int setup_output_format(void) int i; char *fmtspec; + if (opt_output_format && !strcmp(opt_output_format, "sigrok")) { + /* Doesn't really exist as an output module - this is + * the session save mode. */ + g_free(opt_output_format); + opt_output_format = NULL; + } + if (!opt_output_format) { opt_output_format = DEFAULT_OUTPUT_FORMAT; /* we'll need to remember this so when saving to a file