]> sigrok.org Git - sigrok-cli.git/blobdiff - main.c
Fix saving to session file.
[sigrok-cli.git] / main.c
diff --git a/main.c b/main.c
index f34007ceba4857480b386775d16babef11157d71..ff3225fd2b35aee03728911d8efbd1bda71fda24 100644 (file)
--- a/main.c
+++ b/main.c
@@ -18,7 +18,6 @@
  */
 
 #include "sigrok-cli.h"
-#include "config.h"
 #include <stdlib.h>
 #include <glib.h>
 
@@ -35,7 +34,7 @@ gchar *opt_input_file = NULL;
 gchar *opt_output_file = NULL;
 gchar *opt_drv = NULL;
 gchar *opt_config = NULL;
-static gchar *opt_probes = NULL;
+static gchar *opt_channels = NULL;
 gchar *opt_channel_group = NULL;
 gchar *opt_triggers = NULL;
 gchar *opt_pds = NULL;
@@ -71,8 +70,8 @@ static GOptionEntry optargs[] = {
                        "Save output to file", NULL},
        {"output-format", 'O', 0, G_OPTION_ARG_STRING, &opt_output_format,
                        "Output format", NULL},
-       {"probes", 'p', 0, G_OPTION_ARG_STRING, &opt_probes,
-                       "Probes to use", NULL},
+       {"channels", 'C', 0, G_OPTION_ARG_STRING, &opt_channels,
+                       "Channels to use", NULL},
        {"channel-group", 'g', 0, G_OPTION_ARG_STRING, &opt_channel_group,
                        "Channel groups", NULL},
        {"triggers", 't', 0, G_OPTION_ARG_STRING, &opt_triggers,
@@ -134,8 +133,8 @@ int select_channels(struct sr_dev_inst *sdi)
        struct sr_channel *ch;
        GSList *selected_channels, *l;
 
-       if (opt_probes) {
-               if (!(selected_channels = parse_channelstring(sdi, opt_probes)))
+       if (opt_channels) {
+               if (!(selected_channels = parse_channelstring(sdi, opt_channels)))
                        return SR_ERR;
 
                for (l = sdi->channels; l; l = l->next) {
@@ -148,7 +147,7 @@ int select_channels(struct sr_dev_inst *sdi)
                g_slist_free(selected_channels);
        }
 #ifdef HAVE_SRD
-       map_pd_probes(sdi);
+       map_pd_channels(sdi);
 #endif
        return SR_OK;
 }
@@ -253,9 +252,6 @@ int main(int argc, char **argv)
        }
 #endif
 
-       if (setup_output_format() != 0)
-               goto done;
-
        if (opt_version)
                show_version();
        else if (opt_scan_devs)