search for: xml_attribute_node

Displaying 15 results from an estimated 15 matches for "xml_attribute_node".

2016 Sep 20
1
[PATCH] libvirt: read disk paths from pools (RHBZ#1366049)
...xpathCtx); + if (xppool == NULL || + xppool->nodesetval == NULL || + xppool->nodesetval->nodeNr == 0) + continue; + assert (xppool->nodesetval->nodeTab[0]); + assert (xppool->nodesetval->nodeTab[0]->type == + XML_ATTRIBUTE_NODE); + attr = (xmlAttrPtr) xppool->nodesetval->nodeTab[0]; + pool = (char *) xmlNodeListGetString (doc, attr->children, 1); + + /* Get the source volume. Required. */ + xpvolume = xmlXPathEvalExpression (BAD_CAST "./source/@volume", +...
2016 Nov 16
3
[PATCH 1/2] libvirt: un-duplicate XPath code
...val == NULL || - xptype->nodesetval->nodeNr == 0) { + if (xPathObjectIsEmpty (xptype)) continue; /* no type attribute, skip it */ - } - assert (xptype->nodesetval->nodeTab[0]); - assert (xptype->nodesetval->nodeTab[0]->type == XML_ATTRIBUTE_NODE); - attr = (xmlAttrPtr) xptype->nodesetval->nodeTab[0]; - type = (char *) xmlNodeListGetString (doc, attr->children, 1); + type = xPathObjectGetString (doc, xptype); if (STREQ (type, "file")) { /* type = "file" so look at source/@file */...
2016 Sep 22
1
[PATCH v2] libvirt: read disk paths from pools (RHBZ#1366049)
...xpathCtx); + if (xppool == NULL || + xppool->nodesetval == NULL || + xppool->nodesetval->nodeNr == 0) + continue; + assert (xppool->nodesetval->nodeTab[0]); + assert (xppool->nodesetval->nodeTab[0]->type == + XML_ATTRIBUTE_NODE); + attr = (xmlAttrPtr) xppool->nodesetval->nodeTab[0]; + pool = (char *) xmlNodeListGetString (doc, attr->children, 1); + + /* Get the source volume. Required. */ + xpvolume = xmlXPathEvalExpression (BAD_CAST "./source/@volume", +...
2016 Aug 27
3
[PATCH 0/3] lib: Don't assert fail if port is missing in XML (RHBZ#1370424).
Simple fix for this assert-fail found in: https://bugzilla.redhat.com/show_bug.cgi?id=1370424 Rich.
2016 Jul 28
3
[PATCH] utils: add new CLEANUP_XMLFREE cleanup, to call xmlFree()
Small cleanup helper to dispose xmlChar* buffers. --- src/cleanup.c | 9 +++++++++ src/guestfs-internal-frontend.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/cleanup.c b/src/cleanup.c index 1aa3051..6c4558c 100644 --- a/src/cleanup.c +++ b/src/cleanup.c @@ -106,6 +106,15 @@ guestfs_int_cleanup_unlink_free (char **ptr) } void +guestfs_int_cleanup_xmlFree
2014 Jan 23
7
[PATCH 0/7] Various fixes for Ceph drives and parsing libvirt XML.
Miscellaneous fixes to: - Handling of Ceph drives now works end-to-end (RHBZ#1026688). - In particular, you can now use rbd:/// URIs in guestfish (and they work). - Parse Ceph & NBD network drives from libvirt XML correctly, so that existing domains with Ceph/NBD drives can be added (eg. using guestfish -d option). - Add more testing of the above.
2013 May 07
7
[PATCH 0/5] rbd improvements
This series improves ceph rbd support in libguestfs. It uses the servers list, adds support for a custom username, and starts to add support for custom secret.
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 -
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 Mar 16
0
[PATCH 1/4] p2v: Pass host CPU details to virt-v2v.
...getprogname (), __FILE__, __LINE__); + return; + } + nodes = xpathObj->nodesetval; + nr_nodes = nodes->nodeNr; + /* Iterate over the attributes of the <topology> node. */ + for (i = 0; i < nr_nodes; ++i) { + node = nodes->nodeTab[i]; + + if (node->type == XML_ATTRIBUTE_NODE) { + xmlAttrPtr attr = (xmlAttrPtr) node; + CLEANUP_FREE char *content = NULL; + unsigned *up; + + if (STREQ ((const char *) attr->name, "sockets")) { + up = &cpu->sockets; + parse_attr: + *up = 0; + content = (char *) xmlNodeListGet...
2017 Mar 23
2
[PATCH] p2v: Use lscpu instead of libvirt to get CPU information.
...ntain any + * of the interesting flags above. + */ } - nodes = xpathObj->nodesetval; - nr_nodes = nodes->nodeNr; - /* Iterate over the attributes of the <topology> node. */ - for (i = 0; i < nr_nodes; ++i) { - node = nodes->nodeTab[i]; - - if (node->type == XML_ATTRIBUTE_NODE) { - xmlAttrPtr attr = (xmlAttrPtr) node; - CLEANUP_FREE char *content = NULL; - unsigned *up; - - if (STREQ ((const char *) attr->name, "sockets")) { - up = &cpu->sockets; - parse_attr: - *up = 0; - content = (char *) xmlNodeListGet...
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...g errors are ignored and 0 (zero) will be returned. + */ +static int +xpath_object_get_int (xmlDocPtr doc, xmlXPathObjectPtr obj) +{ + xmlAttrPtr attr; + CLEANUP_FREE char *str; + int value; + + assert (obj->nodesetval->nodeTab[0]); + assert (obj->nodesetval->nodeTab[0]->type == XML_ATTRIBUTE_NODE); + attr = (xmlAttrPtr) obj->nodesetval->nodeTab[0]; + str = (char *) xmlNodeListGetString (doc, attr->children, 1); + + if (sscanf (str, "%d", &value) != 1) + value = 0; /* ignore any parsing error */ + + return value; +} + #else /* no libvirt at compile time */ #...
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...g errors are ignored and 0 (zero) will be returned. + */ +static int +xpath_object_get_int (xmlDocPtr doc, xmlXPathObjectPtr obj) +{ + xmlAttrPtr attr; + CLEANUP_FREE char *str; + int value; + + assert (obj->nodesetval->nodeTab[0]); + assert (obj->nodesetval->nodeTab[0]->type == XML_ATTRIBUTE_NODE); + attr = (xmlAttrPtr) obj->nodesetval->nodeTab[0]; + str = (char *) xmlNodeListGetString (doc, attr->children, 1); + + if (sscanf (str, "%d", &value) != 1) + value = 0; /* ignore any parsing error */ + + return value; +} + #else /* no libvirt at compile time */ #...
2017 Mar 16
7
[PATCH 0/4] Pass CPU vendor, model and topology from source to target.
This is tangentially related to: https://bugzilla.redhat.com/show_bug.cgi?id=1372668 The problem in that bug is that we didn't pass the source CPU model (Sandybridge in that case) through to the target RHV hypervisor. So when the Windows guest booted on the target it gives an error about CPU hardware being disconnected (although it otherwise boots and works fine). This patch series
2017 Mar 17
7
[PATCH v2 0/6] v2v: Pass CPU vendor, model and topology from source to target.
v1 -> v2: - Support for passing topology through -o glance. - Support for passing topology through -o rhv. - Use bool for acpi/apic/pae struct fields in virt-p2v. - Write the xpath expression in error messages instead of file/line. - Fix more memory leaks in virt-p2v cpuid.c. - Passes make check & check-valgrind. There may be some other minor changes. I believe that everything