]> sigrok.org Git - sigrok-cli.git/blobdiff - sigrok-cli.c
more compact display of probe list
[sigrok-cli.git] / sigrok-cli.c
index c42bf899c1ce79f2325233718e6018ec6118e859..d1544ac5867960f98bc2ccc791dad243918fed7b 100644 (file)
@@ -256,16 +256,16 @@ static void print_dev_line(const struct sr_dev_inst *sdi)
        if (sdi->probes) {
                if (g_slist_length(sdi->probes) == 1) {
                        probe = sdi->probes->data;
-                       printf("with 1 probe: %s\n", probe->name);
+                       printf("with 1 probe: %s", probe->name);
                } else {
-                       printf("with %d probes:\n", g_slist_length(sdi->probes));
+                       printf("with %d probes:", g_slist_length(sdi->probes));
                        for (l = sdi->probes; l; l = l->next) {
                                probe = l->data;
-                               printf("      %s\n", probe->name);
+                               printf(" %s", probe->name);
                        }
                }
-       } else
-               printf("\n");
+       }
+       printf("\n");
 }
 
 static void show_dev_list(void)