]> sigrok.org Git - sigrok-cli.git/commitdiff
Support uint64 input/output module options.
authorBert Vermeulen <redacted>
Sat, 30 Aug 2014 18:17:34 +0000 (20:17 +0200)
committerBert Vermeulen <redacted>
Sat, 30 Aug 2014 18:17:34 +0000 (20:17 +0200)
parsers.c

index c2a7c2602f189e814588f0b85d761107d591cfc3..526be7831ecd8afc587a1788cd7179a85ba1d237 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -308,6 +308,10 @@ GHashTable *generic_arg_to_opt(const struct sr_option **opts, GHashTable *genarg
                        gvar = g_variant_new_int32(strtoul(s, NULL, 10));
                        g_hash_table_insert(hash, g_strdup(opts[i]->id),
                                        g_variant_ref_sink(gvar));
+               } else if (g_variant_is_of_type(opts[i]->def, G_VARIANT_TYPE_UINT64)) {
+                       gvar = g_variant_new_uint64(strtoul(s, NULL, 10));
+                       g_hash_table_insert(hash, g_strdup(opts[i]->id),
+                                       g_variant_ref_sink(gvar));
                } else if (g_variant_is_of_type(opts[i]->def, G_VARIANT_TYPE_DOUBLE)) {
                        gvar = g_variant_new_double(strtod(s, NULL));
                        g_hash_table_insert(hash, g_strdup(opts[i]->id),