search for: xmlerror

Displaying 20 results from an estimated 39 matches for "xmlerror".

2014 Jan 17
0
[PATCH INCOMPLETE] launch: libvirt: Use C macros to simplify XML generation.
This commit implements some hairy C macros to simplify XML generation. Given the target XML: <cpu mode="host-passthrough"> <model fallback="allow"/> </cpu> The old code would have looked like this: XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "cpu")); XMLERROR (-1, xmlTextWriterWriteAttribute (xo, BAD_CAST "mode", BAD_CAST "host-passthrough")); XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "m...
2018 Oct 04
0
[PATCH v2 3/4] inspector: Use libxml writer macros.
...\ + "%s:%d: error constructing XML near call to \"%s\"", \ + __FILE__, __LINE__, (fn)); + static void __attribute__((noreturn)) usage (int status) { @@ -307,11 +316,6 @@ main (int argc, char *argv[]) exit (EXIT_SUCCESS); } -#define XMLERROR(code,e) do { \ - if ((e) == (code)) \ - error (EXIT_FAILURE, errno, _("XML write error at \"%s\""), #e); \ - } while (0) - static void output (char **roots) { @@ -327,12 +331,1...
2012 Jul 21
8
[PATCH libguestfs 0/4] Add a libvirt backend to libguestfs.
This preliminary patch series adds a libvirt backend to libguestfs. It's for review only because although it launches the guest OK, there are some missing features that need to be implemented. The meat of the patch is in part 4/4. To save you the trouble of interpreting libxml2 fragments, an example of the generated XML and the corresponding qemu command line are attached below. Note the
2018 Nov 02
7
[PATCH v3 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html v2 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00051.html v3: - Back to using string/string_format and attribute/attribute_format. - Add both single_element and single_element_format. - Rebased and retested. Rich.
2018 Oct 04
2
[PATCH 0/2] Use common macros to help with libxml2 writer.
Consolidate and extend the use of funky start_element() etc macros. Rich.
2014 Jan 16
3
[PATCH 0/2] Don't use snapshot=on
QEMU upstream has broken snapshot=on ... again. These two patches stop using it entirely. Instead we run 'qemu-img create' to create overlay disks as required. Note that the libvirt and UML backends were already doing this: The libvirt backend because <transient/> has never worked, and the UML backend was running uml_mkcow because the UML-equivalent syntax of snapshot=on was
2018 Oct 04
6
[PATCH v2 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html However it was broken in a few ways. First of all the documentation was broken because "/**" enhanced comments were not permitted on macros. This is fixed in the new 1/4 patch. Secondly we didn't use single_element() everywhere possible, which is fixed in the new 4/4 patch. Lastly I've
2012 Oct 08
3
[PATCH v3 0/3] Add support for disk labels and hotplugging.
This is, I guess, version 3 of this patch series which adds disk labels and hotplugging (only hot-add implemented so far). The good news is .. it works! Rich.
2013 Feb 28
5
[PATCH v2 0/5] Fix SELinux security contexts so we can access shared disks (RHBZ#912499).
Link to version 1: https://www.redhat.com/archives/libguestfs/2013-February/thread.html#00122 Changes since version 1: - I've pushed two (of the three) code refactoring patches. The third one proved rather hard to move. - selinuxnorelabel option is no more. Instead there is a second internal API (internal_set_libvirt_selinux_norelabel_disks). - fixed bogus commit message -
2016 Mar 07
0
[PATCH] inspector: add --no-applications and --no-icon
...* favicons in the base distro. + */ + str = guestfs_inspect_get_icon (g, root, &size, + GUESTFS_INSPECT_GET_ICON_FAVICON, 0, + -1); + if (!str) exit (EXIT_FAILURE); + if (size > 0) { + XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "icon")); + XMLERROR (-1, xmlTextWriterWriteBase64 (xo, str, 0, size)); + XMLERROR (-1, xmlTextWriterEndElement (xo)); + } + /* Note we must free (str) even if size == 0, because that indicates + * there was no ico...
2013 Mar 15
0
[PATCH] lib: Add direct support for the NBD (Network Block Device) protocol.
...host path is - * a device or a file. For devices, use: - * <disk type=block device=disk> - * <source dev=[path]> - * For files, use: - * <disk type=file device=disk> - * <source file=[path]> - */ - is_host_device = is_blk (drv_priv->path); - XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "disk")); XMLERROR (-1, xmlTextWriterWriteAttribute (xo, BAD_CAST "device", BAD_CAST "disk")); - if (!is_host_device) { - XMLERROR (-1, - xmlTextWrit...
2012 Oct 08
5
[PATCH v4 0/5] Finish hotplugging support.
This rounds off hotplugging support by allowing you to add and remove drives at any stage (before and after launch). Rich.
2013 Feb 28
7
[PATCH 0/7] Fix SELinux security contexts so we can access shared disks (RHBZ#912499).
https://bugzilla.redhat.com/show_bug.cgi?id=912499 (especially comments 7 & 10) This patch set is the final fix so that we can access disks in use by other guests when SELinux and sVirt are enabled. Previously such disks were inaccessible because sVirt labels the disks with a random SELinux label to prevent other instances of qemu from being able to read them. So naturally the libguestfs
2017 Oct 05
2
[PATCH] inspector: Fix virt-inspector on *BSD guests (RHBZ#1144138).
...on(-) diff --git a/inspector/inspector.c b/inspector/inspector.c index 3583c61df..30d279987 100644 --- a/inspector/inspector.c +++ b/inspector/inspector.c @@ -347,6 +347,7 @@ output_root (xmlTextWriterPtr xo, char *root) char buf[32]; char *canonical_root; size_t size; + int is_bsd; XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "operatingsystem")); @@ -362,6 +363,10 @@ output_root (xmlTextWriterPtr xo, char *root) if (STRNEQ (str, "unknown")) XMLERROR (-1, xmlTextWriterWriteElement (xo, BAD_CAST "name", BAD_CAST str)); + is_bsd =...
2012 Nov 01
4
[PATCH v2 0/3] New inspect_list_applications2 API
Here's the new API method and update to virt-inspector. I still need to implement app_arch for debian and windows (if applicable), for now they just return empty strings. New in v2: incorporated feedback from v1, also added patch #3 which updates the documentation where it references the deprecated API. Take it or leave it.
2018 Oct 01
7
[PATCH v2 API PROPOSAL 0/5] inspection Add network interfaces to inspection data.
The proposed API is the same as v1, but this includes an implementation (for /etc/sysconfig/network-scripts/ifcfg-*) and modifications to virt-inspector. This compiles and works. If you look in patch 5 you can see proposed output as virt-inspector XML for a guest (although this guest has not been booted, so a real guest would hopefully have a hwaddr="MAC" attribute too). Rich.
2013 Apr 05
3
[PATCH] Add support for SSH (Secure Shell) block device.
Note this patch requires a non-upstream qemu patch that I've been experimenting with. See qemu-devel list. Rich.
2013 Sep 06
1
[PATCH] arm: appliance: Add support for device trees (dtb's).
This is the libguestfs companion patch to: https://www.redhat.com/archives/libguestfs/2013-September/msg00045.html Rich.
2017 Oct 05
2
Re: [PATCH] inspector: Fix virt-inspector on *BSD guests (RHBZ#1144138).
...87 100644 > > --- a/inspector/inspector.c > > +++ b/inspector/inspector.c > > @@ -347,6 +347,7 @@ output_root (xmlTextWriterPtr xo, char *root) > > char buf[32]; > > char *canonical_root; > > size_t size; > > + int is_bsd; > > > > XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "operatingsystem")); > > > > @@ -362,6 +363,10 @@ output_root (xmlTextWriterPtr xo, char *root) > > if (STRNEQ (str, "unknown")) > > XMLERROR (-1, > > xmlTextWriterWriteElement (xo, BAD_...
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...guestfs_int_program_name, long_options[option_index].name, option_index); + guestfs_int_program_name, + long_options[option_index].name, option_index); exit (EXIT_FAILURE); } break; @@ -291,7 +292,7 @@ main (int argc, char *argv[]) #define XMLERROR(code,e) do { \ if ((e) == (code)) { \ fprintf (stderr, _("%s: XML write error at \"%s\": %m\n"), \ - #e, guestfs_int_program_name);...