search for: guestfs_impl_disk_has_backing_fil

Displaying 10 results from an estimated 10 matches for "guestfs_impl_disk_has_backing_fil".

2018 Aug 22
3
Re: [PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
...G); > + v = caml_copy_string (""); > + Store_field (rv, 0, v); > + } NACK, this is not correct. null is a proper type of value in JSON, and thus JSON.json_t must represent it as well. This is even used in other parts, for example the check of backing files of disks (see guestfs_impl_disk_has_backing_file). -- Pino Toscano
2018 Aug 22
0
Re: [PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
...t;"); > > + Store_field (rv, 0, v); > > + } > > NACK, this is not correct. null is a proper type of value in JSON, and > thus JSON.json_t must represent it as well. > > This is even used in other parts, for example the check of backing > files of disks (see guestfs_impl_disk_has_backing_file). Can you explain more about what a "null" JSON document looks like? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines....
2016 Jan 09
0
[PATCH] build: Require qemu >= 1.3.0 and yajl.
...ilename) -{ - switch (which_parser (g)) { - case QEMU_IMG_INFO_NEW_PARSER: - return get_disk_virtual_size (g, filename); - case QEMU_IMG_INFO_OLD_PARSER: - return old_parser_disk_virtual_size (g, filename); - case QEMU_IMG_INFO_UNKNOWN_PARSER: - abort (); - } - - abort (); -} - -int -guestfs_impl_disk_has_backing_file (guestfs_h *g, const char *filename) -{ - switch (which_parser (g)) { - case QEMU_IMG_INFO_NEW_PARSER: - return get_disk_has_backing_file (g, filename); - case QEMU_IMG_INFO_OLD_PARSER: - return old_parser_disk_has_backing_file (g, filename); - case QEMU_IMG_INFO_UNKNOWN_PARSER: - abo...
2018 Feb 12
0
[PATCH v2 1/1] Switch from YAJL to Jansson
...uot;); + if (!json_is_integer (node)) + goto bad_type; + + return json_integer_value (node); bad_type: error (g, _("qemu-img info: JSON output did not contain ‘virtual-size’ key")); @@ -126,29 +109,25 @@ guestfs_impl_disk_virtual_size (guestfs_h *g, const char *filename) int guestfs_impl_disk_has_backing_file (guestfs_h *g, const char *filename) { - size_t i, len; - CLEANUP_YAJL_TREE_FREE yajl_val tree = get_json_output (g, filename); + CLEANUP_JSON_T_DECREF json_t *tree = get_json_output (g, filename); + json_t *node; if (tree == NULL) return -1; - if (! YAJL_IS_OBJECT (tree)) + if...
2017 Nov 23
0
[PATCH 1/1] Switch from YAJL to Jansson
...uot;); + if (!json_is_integer (node)) + goto bad_type; + + return json_integer_value (node); bad_type: error (g, _("qemu-img info: JSON output did not contain ‘virtual-size’ key")); @@ -127,29 +110,25 @@ guestfs_impl_disk_virtual_size (guestfs_h *g, const char *filename) int guestfs_impl_disk_has_backing_file (guestfs_h *g, const char *filename) { - size_t i, len; - CLEANUP_YAJL_TREE_FREE yajl_val tree = get_json_output (g, filename); + CLEANUP_JSON_T_DECREF json_t *tree = get_json_output (g, filename); + json_t *node; if (tree == NULL) return -1; - if (! YAJL_IS_OBJECT (tree)) + if...
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
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2018 Aug 20
6
[PATCH 0/4] mltools: JSON unification
An evolution of: https://www.redhat.com/archives/libguestfs/2018-August/msg00155.html
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.