search for: yajl_get_array

Displaying 14 results from an estimated 14 matches for "yajl_get_array".

2018 Feb 12
0
[PATCH v2 1/1] Switch from YAJL to Jansson
...- sv = convert_yajl_value (YAJL_GET_OBJECT(val)->values[i], level + 1); + sv = convert_json_t (jvalue, level + 1); Store_field (v, 1, sv); Store_field (lv, i, v); + ++i; } Store_field (rv, 0, lv); - } else if (YAJL_IS_ARRAY (val)) { - const size_t len = YAJL_GET_ARRAY(val)->len; + } else if (json_is_array (val)) { + const size_t len = json_array_size (val); size_t i; + json_t *jvalue; rv = caml_alloc (1, 4); lv = caml_alloc_tuple (len); - for (i = 0; i < len; ++i) { - v = convert_yajl_value (YAJL_GET_ARRAY(val)->values[i],...
2017 Nov 23
0
[PATCH 1/1] Switch from YAJL to Jansson
...- sv = convert_yajl_value (YAJL_GET_OBJECT(val)->values[i], level + 1); + sv = convert_json_t (jvalue, level + 1); Store_field (v, 1, sv); Store_field (lv, i, v); + ++i; } Store_field (rv, 0, lv); - } else if (YAJL_IS_ARRAY (val)) { - const size_t len = YAJL_GET_ARRAY(val)->len; + } else if (json_is_array (val)) { + const size_t len = json_array_size (val); size_t i; + json_t *jvalue; rv = caml_alloc (1, 4); lv = caml_alloc_tuple (len); - for (i = 0; i < len; ++i) { - v = convert_yajl_value (YAJL_GET_ARRAY(val)->values[i],...
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 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
...ystems", + vfs_type); return r; } diff --git a/daemon/ldm.c b/daemon/ldm.c index 3563313..3705aa4 100644 --- a/daemon/ldm.c +++ b/daemon/ldm.c @@ -187,9 +187,9 @@ json_value_to_string_list (yajl_val node) if (! YAJL_IS_ARRAY (node)) return TYPE_ERROR; - len = YAJL_GET_ARRAY(node)->len; + len = YAJL_GET_ARRAY (node)->len; for (i = 0; i < len; ++i) { - n = YAJL_GET_ARRAY(node)->values[i]; + n = YAJL_GET_ARRAY (node)->values[i]; if (! YAJL_IS_STRING (n)) return TYPE_ERROR; if (add_string (&strs, YAJL_GET_STRING (n)) == -1) @@...
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 Sep 12
0
[PATCH v2 4/5] lib: qemu: Add accessor to test if qemu does mandatory locking.
...CT(tree)->values[i]; + + if (STREQ (k, key) && + YAJL_IS_STRING (v) && STREQ (YAJL_GET_STRING (v), value)) + return 1; + if (qmp_schema_contains (v, key, value)) + return 1; + } + } + else if (YAJL_IS_ARRAY (tree)) { + for (i = 0; i < YAJL_GET_ARRAY(tree)->len; ++i) { + yajl_val v; + + v = YAJL_GET_ARRAY(tree)->values[i]; + + if (qmp_schema_contains (v, key, value)) + return 1; + } + } + + return 0; +} + +#pragma GCC diagnostic pop + +/** + * Test if the qemu binary uses mandatory file locking, added in + * QEM...
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
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.
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
...YAJL_GET_OBJECT(val)->keys[i]); + Store_field (v, 0, sv); + sv = convert_yajl_value (YAJL_GET_OBJECT(val)->values[i], level + 1); + Store_field (v, 1, sv); + Store_field (lv, i, v); + } + Store_field (rv, 0, lv); + } else if (YAJL_IS_ARRAY (val)) { + size_t len = YAJL_GET_ARRAY(val)->len; + size_t i; + rv = caml_alloc (1, 4); + lv = caml_alloc_tuple (len); + for (i = 0; i < len; ++i) { + v = convert_yajl_value (YAJL_GET_ARRAY(val)->values[i], level + 1); + Store_field (lv, i, v); + } + Store_field (rv, 0, lv); + } else if (YAJL_IS_STR...
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.
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