search for: parse_json_get_object_string_list

Displaying 9 results from an estimated 9 matches for "parse_json_get_object_string_list".

2017 Nov 03
2
[PATCH] daemon: ldm: avoid manual free()
...ed, 1 deletion(-) diff --git a/daemon/ldm.c b/daemon/ldm.c index 1bab28989..2f4d2aef3 100644 --- a/daemon/ldm.c +++ b/daemon/ldm.c @@ -286,7 +286,6 @@ do_ldmtool_diskgroup_volumes (const char *diskgroup) reply_with_error ("%s", err); return NULL; } - free (err); return parse_json_get_object_string_list (out, "volumes", __func__, "ldmtool show diskgroup"); -- 2.13.6
2012 Dec 07
2
[PATCH] Add support for Windows dynamic disks (libldm / ldmtool).
This is just an initial version of the patch, not to be applied. It implements just the diskgroup functions, ie. corresponding to these ldmtool commands: * ldmtool scan * ldmtool show diskgroup <guid> I have chosen yajl as the JSON parsing library (don't worry, this is optional). You will also, of course, need ldmtool which is not packaged in anything except Fedora. Rich.
2017 Nov 03
0
Re: [PATCH] daemon: ldm: avoid manual free()
...mon/ldm.c > index 1bab28989..2f4d2aef3 100644 > --- a/daemon/ldm.c > +++ b/daemon/ldm.c > @@ -286,7 +286,6 @@ do_ldmtool_diskgroup_volumes (const char *diskgroup) > reply_with_error ("%s", err); > return NULL; > } > - free (err); > > return parse_json_get_object_string_list (out, "volumes", > __func__, "ldmtool show diskgroup"); > -- > 2.13.6 Ouch. I guess we don't test this API ..? ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my pro...
2015 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
...node = YAJL_GET_OBJECT(tree)->values[i]; + if (STREQ (YAJL_GET_OBJECT (tree)->keys[i], key)) { + node = YAJL_GET_OBJECT (tree)->values[i]; if ((flags & GET_STRING_NULL_TO_EMPTY) && YAJL_IS_NULL (node)) ret = strdup (""); @@ -282,10 +282,10 @@ parse_json_get_object_string_list (const char *json, const char *key, if (! YAJL_IS_OBJECT (tree)) goto bad_type; - len = YAJL_GET_OBJECT(tree)->len; + len = YAJL_GET_OBJECT (tree)->len; for (i = 0; i < len; ++i) { - if (STREQ (YAJL_GET_OBJECT(tree)->keys[i], key)) { - node = YAJL_GET_OBJECT(tree)...
2016 Jan 09
0
[PATCH] build: Require qemu >= 1.3.0 and yajl.
...t;yajl/yajl_tree.h> -#endif #include "daemon.h" #include "actions.h" #include "optgroups.h" -#if HAVE_YAJL - GUESTFSD_EXT_CMD(str_ldmtool, ldmtool); int @@ -441,9 +437,3 @@ do_ldmtool_volume_partitions (const char *diskgroup, const char *volume) return parse_json_get_object_string_list (out, "partitions", __func__, "ldmtool show volume"); } - -#else /* !HAVE_YAJL */ - -OPTGROUP_LDM_NOT_AVAILABLE - -#endif diff --git a/m4/guestfs_libraries.m4 b/m4/guestfs_libraries.m4 index 0187c20..c5a4a01 100644 --- a/m4/guestfs_l...
2018 Feb 12
0
[PATCH v2 1/1] Switch from YAJL to Jansson
...(tree); + + return ret; bad_type: reply_with_error ("output of '%s' was not a JSON object " "containing a key '%s' of type string", cmd, key); - yajl_tree_free (tree); + json_decref (tree); return NULL; } @@ -189,33 +177,30 @@ parse_json_get_object_string_list (const char *json, const char *key, const char *func, const char *cmd) { char **ret; - yajl_val tree, node; - size_t i, len; + json_t *tree, *node; tree = parse_json (json, func); if (tree == NULL) return NULL; - if (! YAJL_IS_OBJECT (tree)...
2017 Nov 23
0
[PATCH 1/1] Switch from YAJL to Jansson
...(tree); + + return ret; bad_type: reply_with_error ("output of '%s' was not a JSON object " "containing a key '%s' of type string", cmd, key); - yajl_tree_free (tree); + json_decref (tree); return NULL; } @@ -189,33 +177,30 @@ parse_json_get_object_string_list (const char *json, const char *key, const char *func, const char *cmd) { char **ret; - yajl_val tree, node; - size_t i, len; + json_t *tree, *node; tree = parse_json (json, func); if (tree == NULL) return NULL; - if (! YAJL_IS_OBJECT (tree)...
2018 Feb 12
2
[PATCH v2 0/1] RFC: switch from YAJL to Jansson
Hi, recently, there was a discussion in the development list of libvirt on switching to a different JSON library than YAJL [1]. Since we use YAJL, and the points there IMHO apply to libguestfs as well, I decided to give a try in switching to Jansson [2]. The result IMHO is nice, with the additional APIs of Jansson that simplify some of our code. Unlike with YAJL, I did not set a minimum
2017 Nov 23
4
[PATCH 0/1] RFC: switch from YAJL to Jansson
Hi, recently, there was a discussion in the development list of libvirt on switching to a different JSON library than YAJL [1]. Since we use YAJL, and the points there IMHO apply to libguestfs as well, I decided to give a try in switching to Jansson [2]. The result IMHO is nice, with the additional APIs of Jansson that simplify some of our code. Unlike with YAJL, I did not set a minimum