]> sigrok.org Git - sigrok-cli.git/blobdiff - options.c
Add --get option.
[sigrok-cli.git] / options.c
index c8b51ec1e353c2dfb2be035886ad6a58199adc60..179d892f4021239bda222ee4fdd84e9462e3c7b3 100644 (file)
--- a/options.c
+++ b/options.c
@@ -45,6 +45,7 @@ gchar *opt_time = NULL;
 gchar *opt_samples = NULL;
 gchar *opt_frames = NULL;
 gchar *opt_continuous = NULL;
+gchar *opt_get = NULL;
 gchar *opt_set = NULL;
 
 /* defines a callback function that generates
@@ -85,6 +86,7 @@ CHECK_ONCE(opt_pd_binary)
 CHECK_ONCE(opt_time)
 CHECK_ONCE(opt_samples)
 CHECK_ONCE(opt_frames)
+CHECK_ONCE(opt_get)
 
 #undef CHECK_STR_ONCE
 
@@ -140,6 +142,7 @@ static const GOptionEntry optargs[] = {
                        "Number of frames to acquire", NULL},
        {"continuous", 0, 0, G_OPTION_ARG_NONE, &opt_continuous,
                        "Sample continuously", NULL},
+       {"get", 0, 0, G_OPTION_ARG_CALLBACK, &check_opt_get, "Get device option only", NULL},
        {"set", 0, 0, G_OPTION_ARG_NONE, &opt_set, "Set device options only", NULL},
        {NULL, 0, 0, 0, NULL, NULL, NULL}
 };