search for: yajl_tree_free

Displaying 16 results from an estimated 16 matches for "yajl_tree_free".

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.
2018 Feb 12
0
[PATCH v2 1/1] Switch from YAJL to Jansson
..._ERROR_TEXT_LENGTH]; + if (strlen (err.text) > 0) + snprintf (buf, sizeof buf, "JSON parse error: %s", err.text); else snprintf (buf, sizeof buf, "unknown JSON parse error"); caml_invalid_argument (buf); } - rv = convert_yajl_value (tree, 1); - yajl_tree_free (tree); + rv = convert_json_t (tree, 1); + json_decref (tree); CAMLreturn (rv); } diff --git a/contrib/p2v/aux-scripts/do-build.sh b/contrib/p2v/aux-scripts/do-build.sh index 5edb53d0e..dd6424bb4 100644 --- a/contrib/p2v/aux-scripts/do-build.sh +++ b/contrib/p2v/aux-scripts/do-build.sh @@ -...
2017 Nov 23
0
[PATCH 1/1] Switch from YAJL to Jansson
..._ERROR_TEXT_LENGTH]; + if (strlen (err.text) > 0) + snprintf (buf, sizeof buf, "JSON parse error: %s", err.text); else snprintf (buf, sizeof buf, "unknown JSON parse error"); caml_invalid_argument (buf); } - rv = convert_yajl_value (tree, 1); - yajl_tree_free (tree); + rv = convert_json_t (tree, 1); + json_decref (tree); CAMLreturn (rv); } diff --git a/builder/yajl_tests.ml b/builder/yajl_tests.ml index f5a44f2fa..3d780d4f1 100644 --- a/builder/yajl_tests.ml +++ b/builder/yajl_tests.ml @@ -82,6 +82,7 @@ let test_tree_parse_invalid ctx = asser...
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
2017 Nov 23
1
Re: [PATCH 1/1] Switch from YAJL to Jansson
...ource.h> > #endif > >-#include <yajl/yajl_tree.h> >+#include <jansson.h> > > #include "guestfs.h" > #include "guestfs-internal.h" > #include "guestfs-internal-actions.h" > > #ifdef HAVE_ATTRIBUTE_CLEANUP >-#define CLEANUP_YAJL_TREE_FREE __attribute__((cleanup(cleanup_yajl_tree_free))) >+#define CLEANUP_JSON_T_DECREF __attribute__((cleanup(cleanup_json_t_decref))) > > static void >-cleanup_yajl_tree_free (void *ptr) >+cleanup_json_t_decref (void *ptr) > { >- yajl_tree_free (* (yajl_val *) ptr); >+ json_dec...
2017 Sep 12
0
[PATCH v2 3/5] lib: qemu: Run QMP ‘query-commands’, ‘query-qmp-schema’ against the qemu binary.
...id read_all (guestfs_h *g, void *retv, const char *buf, size_t len) { @@ -754,6 +923,10 @@ guestfs_int_free_qemu_data (struct qemu_data *data) if (data) { free (data->qemu_help); free (data->qemu_devices); + free (data->qmp_commands); + free (data->qmp_schema); + yajl_tree_free (data->qmp_commands_tree); + yajl_tree_free (data->qmp_schema_tree); free (data); } } -- 2.13.2
2017 Jul 25
2
build from github source
...g to be done for 'all'. > make[2]: Leaving directory '/home/pahome/git/libguestfs/docs' > Making all in examples > make[2]: Entering directory '/home/pahome/git/libguestfs/examples' > CCLD create-disk > ../lib/.libs/libguestfs.so: undefined reference to `yajl_tree_free' > ../lib/.libs/libguestfs.so: undefined reference to `yajl_tree_parse' > collect2: error: ld returned 1 exit status > Makefile:1926: recipe for target 'create-disk' failed > make[2]: *** [create-disk] Error 1 > make[2]: Leaving directory '/home/pahome/git/libgues...
2016 Jan 09
0
[PATCH] build: Require qemu >= 1.3.0 and yajl.
...(guestfs_h *g); -static char *get_disk_format (guestfs_h *g, const char *filename); -static int64_t get_disk_virtual_size (guestfs_h *g, const char *filename); -static int get_disk_has_backing_file (guestfs_h *g, const char *filename); -#if HAVE_YAJL +#ifdef HAVE_ATTRIBUTE_CLEANUP +#define CLEANUP_YAJL_TREE_FREE __attribute__((cleanup(cleanup_yajl_tree_free))) + +static void +cleanup_yajl_tree_free (void *ptr) +{ + yajl_tree_free (* (yajl_val *) ptr); +} + +#else +#define CLEANUP_YAJL_TREE_FREE +#endif + static yajl_val get_json_output (guestfs_h *g, const char *filename); -#endif -static char *old_parse...
2017 Sep 11
4
[PATCH 0/4] lib: qemu: Add test for mandatory locking.
The patch I posted last week to disable mandatory locking for readonly drives (https://www.redhat.com/archives/libguestfs/2017-September/msg00013.html) was wrong in a couple of respects. Firstly it didn't work, which I didn't detect because my tests were testing the wrong thing. Oops. Secondly it used a simple version number check to detect qemu binaries implementing mandatory locking.
2017 Sep 12
9
[PATCH v2 0/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306)
Patches 1-4 are almost the same as they are when previously posted here: https://www.redhat.com/archives/libguestfs/2017-September/msg00039.html Patch 5 actually uses the mandatory locking test to turn off locking in the narrow case where a drive is opened readonly, and then only for the drive being inspected. Passes ordinary tests (‘check-direct’ and ‘check-valgrind-direct’). Rich.
2015 Aug 12
0
[PATCH 2/2] builder: support Simple Streams v1.0 as index metadata
...sizeof error_buf]; + if (strlen (error_buf) > 0) + snprintf (buf, sizeof buf, "JSON parse error: %s", error_buf); + else + snprintf (buf, sizeof buf, "unknown JSON parse error"); + caml_invalid_argument (buf); + } + + rv = convert_yajl_value (tree, 1); + yajl_tree_free (tree); + + CAMLreturn (rv); +} + +#else + +value +virt_builder_yajl_is_available (value unit) +{ + /* NB: noalloc */ + return Val_false; +} + +value +virt_builder_yajl_tree_parse (value stringv) +{ + caml_invalid_argument ("virt-builder was compiled without yajl support"); +} + +#end...
2015 Aug 12
4
[PATCH 0/2 v2] RFC: builder: support for Simple Streams metadata
Hi, this series adds a basic support for Simple Streams v1.0 metadata files. This makes it possible to create a repository .conf files with [cirros] uri=http://download.cirros-cloud.net format=simplestreams to read the latest version of each CirrOS image. TODO items: - check the pasted metadata: listing and creating images works, so most of the current metadata is correct - possibly wait
2017 Sep 12
8
[PATCH v3 0/6] launch: direct: Disable qemu locking when opening drives readonly.
v2 -> v3: - I addressed everything that Pino mentioned last time. - It's tricky to get a stable run when multiple copies of qemu are involved, because the same cache files get overwritten by parallel libguestfs. So I changed the names of the cache files to include the qemu binary key (size, mtime), which removes this conflict. This is in new patch 4/6. Rich.
2015 Sep 07
5
[PATCH 0/4 v3] builder: support for Simple Streams metadata
Hi, this series adds a basic support for Simple Streams v1.0 metadata files. This makes it possible to create a repository .conf files with [cirros] uri=http://download.cirros-cloud.net format=simplestreams to read the latest version of each CirrOS image. Thanks, Pino Toscano (4): builder: add non-int revisions builder: add simple libyajl binding build: expose HAVE_YAJL to automake
2015 Jul 28
19
[PATCH 00/10] RFC: builder: first support for Simple Streams metadata
Hi, this series adds a basic support for Simple Streams v1.0 metadata files. This makes it possible to create a repository .conf files with [cirros] uri=http://download.cirros-cloud.net format=simplestreams to read the latest version of each CirrOS image. TODO items: - a bit more testing: listing and creating images works, so the current metadata is correct - handle revisions, so newer