]> sigrok.org Git - sigrok-cli.git/commitdiff
cli: -V: Print protocol description upon "-l 3" or higher.
authorUwe Hermann <redacted>
Tue, 8 May 2012 22:06:01 +0000 (00:06 +0200)
committerUwe Hermann <redacted>
Tue, 8 May 2012 22:06:01 +0000 (00:06 +0200)
sigrok-cli.c

index 2aec20593269085241b28ccfb5ab9c205030e597..a4c9303247186854dc50604f35b0b4ee8be467de 100644 (file)
@@ -124,6 +124,9 @@ static void show_version(void)
                for (l = srd_decoder_list(); l; l = l->next) {
                        dec = l->data;
                        printf("  %-20s %s\n", dec->id, dec->longname);
+                       /* Print protocol description upon "-l 3" or higher. */
+                       if (opt_loglevel >= SR_LOG_INFO)
+                               printf("  %-20s %s\n", "", dec->desc);
                }
                srd_exit();
        }