search for: yajl_tree

Displaying 20 results from an estimated 27 matches for "yajl_tree".

2017 Sep 12
1
Re: [PATCH v2 3/5] lib: qemu: Run QMP ‘query-commands’, ‘query-qmp-schema’ against the qemu binary.
...++++++++++++++- > 1 file changed, 175 insertions(+), 2 deletions(-) > > diff --git a/lib/qemu.c b/lib/qemu.c > index bdd9947a8..34775041f 100644 > --- a/lib/qemu.c > +++ b/lib/qemu.c > @@ -37,6 +37,8 @@ > > #include <libxml/uri.h> > > +#include <yajl/yajl_tree.h> > + > #include "ignore-value.h" > > #include "guestfs.h" > @@ -50,9 +52,13 @@ struct qemu_data { > > char *qemu_help; /* Output of qemu -help. */ > char *qemu_devices; /* Output of qemu -device ? */ > + char *q...
2017 Nov 23
1
Re: [PATCH 1/1] Switch from YAJL to Jansson
...ions(-) > This is nice, just one idea below that might be useful to you. >diff --git a/lib/info.c b/lib/info.c >index f7378adfd..ada4cf03c 100644 >--- a/lib/info.c >+++ b/lib/info.c >@@ -38,53 +38,46 @@ > #include <sys/resource.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)...
2016 Jan 09
0
[PATCH] build: Require qemu >= 1.3.0 and yajl.
...9;%s' in %s, skipping it\n") prog fmt file; diff --git a/builder/yajl-c.c b/builder/yajl-c.c index 194fa34..f34196e 100644 --- a/builder/yajl-c.c +++ b/builder/yajl-c.c @@ -23,18 +23,13 @@ #include <caml/memory.h> #include <caml/mlvalues.h> -#if HAVE_YAJL #include <yajl/yajl_tree.h> -#endif #include <stdio.h> #include <string.h> #define Val_none (Val_int (0)) -value virt_builder_yajl_is_available (value unit); - -#if HAVE_YAJL value virt_builder_yajl_tree_parse (value stringv); static value @@ -95,13 +90,6 @@ convert_yajl_value (yajl_val val, int...
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
2018 Feb 12
0
[PATCH v2 1/1] Switch from YAJL to Jansson
...\ - $(YAJL_LIBS) \ + $(JANSSON_LIBS) \ $(LIBINTL) \ -lgnu diff --git a/builder/yajl-c.c b/builder/yajl-c.c index 3c2402e42..e53755f55 100644 --- a/builder/yajl-c.c +++ b/builder/yajl-c.c @@ -23,24 +23,17 @@ #include <caml/memory.h> #include <caml/mlvalues.h> -#include <yajl/yajl_tree.h> +#include <jansson.h> #include <stdio.h> #include <string.h> -/* GCC can't work out that the YAJL_IS_<foo> test is sufficient to - * ensure that YAJL_GET_<foo> later doesn't return NULL. - */ -#if defined(__GNUC__) && __GNUC__ >= 6 /* gcc...
2017 Nov 23
0
[PATCH 1/1] Switch from YAJL to Jansson
...\ - $(YAJL_LIBS) \ + $(JANSSON_LIBS) \ $(LIBINTL) \ -lgnu diff --git a/builder/yajl-c.c b/builder/yajl-c.c index 3c2402e42..03fbced6e 100644 --- a/builder/yajl-c.c +++ b/builder/yajl-c.c @@ -23,24 +23,17 @@ #include <caml/memory.h> #include <caml/mlvalues.h> -#include <yajl/yajl_tree.h> +#include <jansson.h> #include <stdio.h> #include <string.h> -/* GCC can't work out that the YAJL_IS_<foo> test is sufficient to - * ensure that YAJL_GET_<foo> later doesn't return NULL. - */ -#if defined(__GNUC__) && __GNUC__ >= 6 /* gcc...
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
2015 May 26
0
[PATCH] lib: Limit space and time used by 'qemu-img info' subprocess.
...d4221c..bfd7860 100644 --- a/src/info.c +++ b/src/info.c @@ -31,6 +31,14 @@ #include <assert.h> #include <string.h> +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif + +#ifdef HAVE_SYS_RESOURCE_H +#include <sys/resource.h> +#endif + #if HAVE_YAJL #include <yajl/yajl_tree.h> #endif @@ -269,7 +277,13 @@ get_json_output (guestfs_h *g, const char *filename) guestfs_int_cmd_add_arg (cmd, "json"); guestfs_int_cmd_add_arg (cmd, fdpath); guestfs_int_cmd_set_stdout_callback (cmd, parse_json, &tree, - CMD_STDOUT_...
2017 Jul 14
0
[PATCH 13/27] daemon: Reimplement ‘list_ldm_(volumes|partitions)’ APIs in OCaml.
...rted.ml \ diff --git a/daemon/ldm.c b/daemon/ldm.c index 75418e8d3..5106e65f9 100644 --- a/daemon/ldm.c +++ b/daemon/ldm.c @@ -23,7 +23,6 @@ #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> -#include <glob.h> #include <string.h> #include <yajl/yajl_tree.h> @@ -47,87 +46,6 @@ optgroup_ldm_available (void) return prog_exists (str_ldmtool); } -static int -glob_errfunc (const char *epath, int eerrno) -{ - fprintf (stderr, "glob: failure reading %s: %s\n", epath, strerror (eerrno)); - return 1; -} - -static char ** -get_devices (co...
2017 Sep 12
0
[PATCH v2 3/5] lib: qemu: Run QMP ‘query-commands’, ‘query-qmp-schema’ against the qemu binary.
....c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 175 insertions(+), 2 deletions(-) diff --git a/lib/qemu.c b/lib/qemu.c index bdd9947a8..34775041f 100644 --- a/lib/qemu.c +++ b/lib/qemu.c @@ -37,6 +37,8 @@ #include <libxml/uri.h> +#include <yajl/yajl_tree.h> + #include "ignore-value.h" #include "guestfs.h" @@ -50,9 +52,13 @@ struct qemu_data { char *qemu_help; /* Output of qemu -help. */ char *qemu_devices; /* Output of qemu -device ? */ + char *qmp_commands; /* Output of QMP query...
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 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.
2014 Oct 23
17
[PATCH 00/16] Small bits of non-Linux porting
Hi, from time to time, there have been requests (or attempts, like the mingw port posted on the list some months ago) to make libguestfs work on OSes different than Linux. Of course this would imply using a fixed appliance, since it is currently heavily dependent on Linux. The attached series provides some easy changes in this direction, resolving some of the easy issues found in porting to
2015 Aug 12
0
[PATCH 2/2] builder: support Simple Streams v1.0 as index metadata
...ignatures sigchecker then ( + let tmpunsigned = + Sigchecker.verify_and_remove_signature sigchecker tmpfile in + match tmpunsigned with + | None -> assert false (* only when not verifying signatures *) + | Some f -> f + ) else + tmpfile in + yajl_tree_parse (read_whole_file file) in + + let downloads = + let uri_index = + if Sigchecker.verifying_signatures sigchecker then + uri ^ "streams/v1/index.sjson" + else + uri ^ "streams/v1/index.json" in + let tree = download_and_parse uri_index in + +...
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 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
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
2017 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here: https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html This series gets as far as a working (and faster) reimplementation of ‘guestfs_list_filesystems’. I also have another patch series on top of this one which reimplements the inspection APIs inside the daemon, but that needs a bit more work still, since inspection turns out to be a very large piece of code. Rich.