search for: error_buf

Displaying 8 results from an estimated 8 matches for "error_buf".

Did you mean: err_buf
2015 Aug 12
0
[PATCH 2/2] builder: support Simple Streams v1.0 as index metadata
...0, Val_false); + } else + rv = Val_none; + + CAMLreturn (rv); +} + +value +virt_builder_yajl_is_available (value unit) +{ + /* NB: noalloc */ + return Val_true; +} + +value +virt_builder_yajl_tree_parse (value stringv) +{ + CAMLparam1 (stringv); + CAMLlocal1 (rv); + yajl_val tree; + char error_buf[256]; + + tree = yajl_tree_parse (String_val (stringv), error_buf, sizeof error_buf); + if (tree == NULL) { + char buf[256 + sizeof error_buf]; + if (strlen (error_buf) > 0) + snprintf (buf, sizeof buf, "JSON parse error: %s", error_buf); + else + snprintf (buf, si...
2018 Feb 12
0
[PATCH v2 1/1] Switch from YAJL to Jansson
...al_true); - } else if (YAJL_IS_FALSE (val)) { + } else if (json_is_false (val)) { rv = caml_alloc (1, 5); Store_field (rv, 0, Val_false); } else @@ -101,21 +99,21 @@ virt_builder_yajl_tree_parse (value stringv) { CAMLparam1 (stringv); CAMLlocal1 (rv); - yajl_val tree; - char error_buf[256]; + json_t *tree; + json_error_t err; - tree = yajl_tree_parse (String_val (stringv), error_buf, sizeof error_buf); + tree = json_loads (String_val (stringv), JSON_DECODE_ANY, &err); if (tree == NULL) { - char buf[256 + sizeof error_buf]; - if (strlen (error_buf) > 0) -...
2017 Nov 23
0
[PATCH 1/1] Switch from YAJL to Jansson
...al_true); - } else if (YAJL_IS_FALSE (val)) { + } else if (json_is_false (val)) { rv = caml_alloc (1, 5); Store_field (rv, 0, Val_false); } else @@ -101,21 +99,21 @@ virt_builder_yajl_tree_parse (value stringv) { CAMLparam1 (stringv); CAMLlocal1 (rv); - yajl_val tree; - char error_buf[256]; + json_t *tree; + json_error_t err; - tree = yajl_tree_parse (String_val (stringv), error_buf, sizeof error_buf); + tree = json_loads (String_val (stringv), 0, &err); if (tree == NULL) { - char buf[256 + sizeof error_buf]; - if (strlen (error_buf) > 0) - snprintf (b...
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 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 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
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