X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=options.c;h=179d892f4021239bda222ee4fdd84e9462e3c7b3;hp=c8b51ec1e353c2dfb2be035886ad6a58199adc60;hb=783e263e581ed7321ca4bdc1ab7a4fafd2100507;hpb=41ce2cbb8ff6253bc1a223298ad93f75dfabcceb diff --git a/options.c b/options.c index c8b51ec..179d892 100644 --- 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} };