search for: xmltextwriterwriteformatstring

Displaying 11 results from an estimated 11 matches for "xmltextwriterwriteformatstring".

2014 Jan 17
0
[PATCH INCOMPLETE] launch: libvirt: Use C macros to simplify XML generation.
...BAD_CAST (value)) == -1) { \ + xml_error ("xmlTextWriterWriteAttribute"); \ + return -1; \ + } + +#define write_format_string(fs,...) \ + if (xmlTextWriterWriteFormatString (xo, fs, ##__VA_ARGS__) == -1) { \ + xml_error ("xmlTextWriterWriteFormatString"); \ + return -1; \ + } + +#define xml_error(fn) perrorf (g, _("%s:%d: error constructing libvirt XML near call to \...
2018 Nov 02
0
[PATCH v3 2/4] common/utils: Move libxml2 writer macros to a common header file.
...\ + } while (0) + +/** + * To define a verbatim string using a format string, use: + * + * string ("%s, world", greeting); + */ +#define string_format(fs,...) \ + do { \ + if (xmlTextWriterWriteFormatString (xo, fs, ##__VA_ARGS__) == -1) { \ + xml_error ("xmlTextWriterWriteFormatString"); \ + } \ + } while (0) + +/** + * To define a comment in the XML, use: + * + * comment ("number of items...
2018 Oct 04
0
[PATCH v2 2/4] common/utils: Move libxml2 writer macros to a common header file.
...* To define a verbatim string, use: + * + * string ("hello"); + * + * or: + * + * string ("%s, world", greeting); + */ +#define string(fs,...) \ + do { \ + if (xmlTextWriterWriteFormatString (xo, fs, ##__VA_ARGS__) == -1) { \ + xml_error ("xmlTextWriterWriteFormatString"); \ + } \ + } while (0) + +/** + * To define a comment in the XML, use: + * + * comment ("number of items...
2011 Sep 02
1
[PATCH 6/7] hivexml: Report attributes in values instead of text.
...extWriterEndAttribute, (writer)); end_value (writer); return 0; @@ -344,7 +349,7 @@ value_dword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value, { xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v; start_value (writer, key, "int32", NULL); - XML_CHECK (xmlTextWriterWriteFormatString, (writer, "%" PRIi32, v)); + XML_CHECK (xmlTextWriterWriteFormatAttribute, (writer, BAD_CAST "value", "%" PRIi32, v)); end_value (writer); return 0; } @@ -355,7 +360,7 @@ value_qword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value, { xmlTex...
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.
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
2016 Jun 30
4
[PATCH 0/4] p2v: Send ^C to remote end to cancel the conversion.
(I don't have a BZ# for this yet, but I'm expecting it to be filed as an RFE) Currently if the user is in the virt-p2v GUI and cancels the conversion, all that happens is we abruptly close the ssh session to virt-v2v. That is bad .. possibly (or maybe not). But in any case there is an alternative: we can send a ^C key to the virt-v2v process, which it could catch and handle gracefully,
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
...22,12 @@ value_dword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value, hive_type t, size_t len, const char *key, int32_t v) { xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v; + int ret = 0; start_value (writer, key, "int32", NULL); - XML_CHECK (xmlTextWriterWriteFormatString, (writer, "%" PRIi32, v)); + XML_CHECK (xmlTextWriterWriteFormatAttribute, (writer, BAD_CAST "value", "%" PRIi32, v)); + ret = value_byte_runs (h, writer_v, value); end_value (writer); - return 0; + return ret; } static int @@ -354,10 +435,12 @@ value_qword...
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
2019 Jul 09
7
[PATCH 0/5] Split virt-p2v in own repository
Hi, as it was already discussed on this list, here it is my attempt in splitting virt-p2v in an own repository. Sadly there are things that must be copied from libguestfs, as it cannot be avoided. The approach taken was to run a script (will send separately) to just get the "p2v" subdirectory with its history as own repository, and then add in few followup commits all the bits needed