X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=show.c;h=4c0cd8f6737667e3322307f3173da232f63ac1a4;hp=817a65fd43e91f02db468f4b97b56eb9a3efbfa4;hb=e786e625d3e3b63ea5e85b98c9e1f0281abdc2d5;hpb=a30daa0376eab28fb655a3a5a3d6716426877b77 diff --git a/show.c b/show.c index 817a65f..4c0cd8f 100644 --- a/show.c +++ b/show.c @@ -649,9 +649,10 @@ void show_output(void) const struct sr_output_module *omod; const struct sr_option *opt; GSList *l; - char *s; + char *s, **tok; - if (!(omod = sr_output_find(opt_output_format))) + tok = g_strsplit(opt_output_format, ":", 0); + if (!tok[0] || !(omod = sr_output_find(tok[0]))) g_critical("Output module '%s' not found.", opt_output_format); printf("ID: %s\nName: %s\n", sr_output_id_get(omod), @@ -680,5 +681,6 @@ void show_output(void) } sr_output_options_free(omod); } + g_strfreev(tok); }