search for: start_element

Displaying 20 results from an estimated 72 matches for "start_element".

2018 Oct 04
0
[PATCH v2 2/4] common/utils: Move libxml2 writer macros to a common header file.
In some places when generating XML output in C code we use some clever macros: start_element ("memory") { attribute ("unit", "MiB"); string ("%d", g->memsize); } end_element (); This commit which is mostly refactoring moves the repeated definitions of these macros into a common header file. I also took this opportunity to change / clea...
2018 Nov 02
0
[PATCH v3 4/4] lib, p2v: Use single_element() macro where possible.
After the previous commit, wherever we had: start_element ("foo") { string ("bar"); } end_element (); this can now be replaced by: single_element ("foo", "bar"); --- common/utils/libxml2-writer-macros.h | 2 +- lib/launch-libvirt.c | 78 ++++++++-------------------- p2v/physical-xml.c...
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
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.
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.
2014 Jan 17
0
[PATCH INCOMPLETE] launch: libvirt: Use C macros to simplify XML generation.
...;)); XMLERROR (-1, xmlTextWriterWriteAttribute (xo, BAD_CAST "fallback", BAD_CAST "allow")); XMLERROR (-1, xmlTextWriterEndElement (xo)); XMLERROR (-1, xmlTextWriterEndElement (xo)); The new code looks like this: start_element ("cpu") { attribute ("mode", "host-passthrough"); start_element ("model") { attribute ("fallback", "allow"); } end_element (); } end_element (); --- src/launch-libvirt.c | 157 +++++++++++++++++++++++++++++++------...
2014 Sep 30
0
[PATCH 2/2] launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012).
...06ae38..50c3f9d 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -1236,6 +1236,19 @@ construct_libvirt_xml_devices (guestfs_h *g, } end_element (); } end_element (); + /* Connect to libvirt bridge virbr0 (see: RHBZ#1148012). */ + if (g->enable_network) { + start_element ("interface") { + attribute ("type", "bridge"); + start_element ("source") { + attribute ("bridge", "virbr0"); + } end_element (); + start_element ("model") { + attribute ("type&...
2018 Dec 06
1
[PATCH] Revert "launch: libvirt: Use qemu-bridge-helper to implement
Possibly for post 1.40. Rich.
2014 Sep 30
4
[PATCH 1/2] appliance: Use dhclient instead of hard-coding IP address of appliance.
qemu in SLIRP mode offers DHCP services to the appliance. We don't use them, but use a fixed IP address intead. This changes the appliance to get its IP address using DHCP. Note: This is only used when the network is enabled. dhclient is somewhat slower, but the penalty (a few seconds) is only paid for network users. We could consider using the faster systemd dhcp client instead. ---
2018 Sep 03
3
[PATCH] ppc64le: Use -machine cap-htm=off unconditionally
Unfortunately I was not able to test this because I don't currently have access to a P9 machine. Rich.
2018 Dec 06
0
[PATCH v2] Revert "launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012)."
...and/or build the appliance. */ TRACE0 (launch_build_libvirt_appliance_start); @@ -1276,19 +1265,6 @@ construct_libvirt_xml_devices (guestfs_h *g, } end_element (); } end_element (); - /* Connect to libvirt bridge (see: RHBZ#1148012). */ - if (g->enable_network) { - start_element ("interface") { - attribute ("type", "bridge"); - start_element ("source") { - attribute ("bridge", params->data->network_bridge); - } end_element (); - start_element ("model") { - attrib...
2014 Oct 01
1
Re: [PATCH 2/2] launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012).
...libvirt.c > +++ b/src/launch-libvirt.c > @@ -1236,6 +1236,19 @@ construct_libvirt_xml_devices (guestfs_h *g, > } end_element (); > } end_element (); > > + /* Connect to libvirt bridge virbr0 (see: RHBZ#1148012). */ > + if (g->enable_network) { > + start_element ("interface") { > + attribute ("type", "bridge"); > + start_element ("source") { > + attribute ("bridge", "virbr0"); > + } end_element (); > + start_element ("model") { > +...
2018 Sep 03
1
Re: [PATCH] ppc64le: Use -machine cap-htm=off unconditionally (RHBZ#1614948).
...diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c > index 48404ef93..53284fc08 100644 > --- a/lib/launch-libvirt.c > +++ b/lib/launch-libvirt.c > @@ -1181,6 +1181,16 @@ construct_libvirt_xml_boot (guestfs_h *g, > } > } > > +#ifdef __powerpc64__ > + start_element ("features") { > + start_element ("pseries") { > + start_element ("htm") { > + attribute ("state", "on"); > + } end_element (); > + } end_element (); > + } end_element (); > +#endif This gene...
2018 Oct 04
0
[PATCH v2 3/4] inspector: Use libxml writer macros.
...f --git a/common/utils/libxml2-writer-macros.h b/common/utils/libxml2-writer-macros.h index b5705645a..13cd22ecd 100644 --- a/common/utils/libxml2-writer-macros.h +++ b/common/utils/libxml2-writer-macros.h @@ -79,6 +79,20 @@ #define empty_element(element) \ do { start_element ((element)) {} end_element (); } while (0) +/** + * To define a single element with no attributes containing some text: + * + * single_element ("name", "%s", text); + * + * which produces C<<< <name>text</name> >>> + */ +#define single_element(el...
2018 Dec 06
2
[PATCH v2] Revert "launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012)."
Let's actually compile and test the patch this time, rather than trusting the RHEL 7.6 patch to apply directly to head ... Rich.
2018 Sep 03
2
[PATCH v3] ppc64le: Use -machine cap-htm=off unconditionally
Of course I mean state=off (not <htm state=on>) ... Rich.
2014 Oct 02
5
[PATCH v3 0/4] launch: libvirt: Use qemu-bridge-helper to implement a
v3: - Various changes to dhclient/dhcpcd as discussed on the mailing list.
2018 Nov 02
2
Re: [PATCH v3 4/4] lib, p2v: Use single_element() macro where possible.
...gt; @@ -86,7 +86,7 @@ > * > * which produces C<<< <name>text</name> >>> > */ > -#define single_element(element, str) \ > +#define single_element(element,str) \ > do { \ > start_element ((element)) { \ > string ((str)); \ This fits better as squashed in patch #3. > - if (params->data->uefi_vars) { > - start_element ("nvram") { > - string (params->data->uefi_vars); > - } end_element (); &...
2018 Nov 02
0
[PATCH v3 2/4] common/utils: Move libxml2 writer macros to a common header file.
In some places when generating XML output in C code we use some clever macros: start_element ("memory") { attribute ("unit", "MiB"); string_format ("%d", g->memsize); } end_element (); This commit which is mostly refactoring moves the repeated definitions of these macros into a common header file. I also took this opportunity to change...
2014 Oct 02
6
[PATCH v2 0/4] launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012).
v2: - Make virbr0 configurable. - Fix the tests.