search for: nodesetv

Displaying 20 results from an estimated 40 matches for "nodesetv".

Did you mean: nodeset
2016 Sep 20
1
[PATCH] libvirt: read disk paths from pools (RHBZ#1366049)
...me = NULL; + + xpathCtx->node = nodes->nodeTab[i]; + + /* Get the source pool. Required. */ + xppool = xmlXPathEvalExpression (BAD_CAST "./source/@pool", + 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-&g...
2016 Nov 16
3
[PATCH 1/2] libvirt: un-duplicate XPath code
...readonly; int t; @@ -527,31 +528,21 @@ for_each_disk (guestfs_h *g, * Check the <disk type=..> attribute first to find out which one. */ xptype = xmlXPathEvalExpression (BAD_CAST "./@type", xpathCtx); - if (xptype == NULL || - xptype->nodesetval == 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 == X...
2016 Sep 22
1
[PATCH v2] libvirt: read disk paths from pools (RHBZ#1366049)
...} else if (STREQ (type, "volume")) { /* type = "volume", use source/@volume */ + CLEANUP_FREE char *pool = NULL; + CLEANUP_FREE char *volume = NULL; + + xpathCtx->node = nodes->nodeTab[i]; - assert (xpfilename); - assert (xpfilename->nodesetval); - if (xpfilename->nodesetval->nodeNr > 0) { - assert (xpfilename->nodesetval->nodeTab[0]); - assert (xpfilename->nodesetval->nodeTab[0]->type == + /* Get the source pool. Required. */ + xppool = xmlXPathEvalExpression (BAD_CAST "./s...
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 -
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
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.
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
2013 Dec 02
1
virsh detach typo
[root at vmhost vms]# virsh detach-disk puppet vdb error: No found disk whose source path or target is vdb [root at vmhost vms]# virsh --version 0.10.2 [root at vmhost vms]# This probably was solved already but if not, "No found disk" probably sounds better if it was "No disk found"
2017 Mar 16
0
[PATCH 1/4] p2v: Pass host CPU details to virt-v2v.
...T "/capabilities/host/cpu/vendor/text()", + xpathCtx); + if (xpathObj == NULL) { + fprintf (stderr, _("%s: %s: %d: unable to evaluate xpath expression\n"), + getprogname (), __FILE__, __LINE__); + return; + } + nodes = xpathObj->nodesetval; + nr_nodes = nodes->nodeNr; + if (nr_nodes > 0) { + node = nodes->nodeTab[0]; + cpu->vendor = (char *) xmlNodeGetContent (node); + } + + /* Get the CPU model. */ + xmlXPathFreeObject (xpathObj); + xpathObj = + xmlXPathEvalExpression (BAD_CAST "/capabilities/host/c...
2017 Mar 23
2
[PATCH] p2v: Use lscpu instead of libvirt to get CPU information.
...quot;; - xpathObj = xmlXPathEvalExpression (BAD_CAST xpathexpr, xpathCtx); - if (xpathObj == NULL) { - fprintf (stderr, _("%s: unable to evaluate xpath expression: %s\n"), - getprogname (), xpathexpr); - virConnectClose (conn); - return; - } - nodes = xpathObj->nodesetval; - nr_nodes = nodes->nodeNr; - if (nr_nodes > 0) { - node = nodes->nodeTab[0]; - cpu->vendor = (char *) xmlNodeGetContent (node); - } - - /* Get the CPU model. */ - xmlXPathFreeObject (xpathObj); - xpathexpr = "/capabilities/host/cpu/model/text()"; - xpathObj =...
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...y, i.e. that C<xpath_object_is_empty> + * is C<false>. + * + * Any parsing 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; /* i...
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...y, i.e. that C<xpath_object_is_empty> + * is C<false>. + * + * Any parsing 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; /* i...
2015 Jun 25
0
[PATCH v2] v2v: Free XML objects in the correct order.
...MLreturn (xpathobjv); } value -v2v_xml_xpathobj_nr_nodes (value xpathobjv) +v2v_xml_xpathobj_ptr_nr_nodes (value xpathobjv) { CAMLparam1 (xpathobjv); - xmlXPathObjectPtr xpathobj = Xpathobj_val (xpathobjv); + xmlXPathObjectPtr xpathobj = Xpathobj_ptr_val (xpathobjv); if (xpathobj->nodesetval == NULL) CAMLreturn (Val_int (0)); @@ -226,10 +229,10 @@ v2v_xml_xpathobj_nr_nodes (value xpathobjv) } value -v2v_xml_xpathobj_get_node_ptr (value xpathobjv, value iv) +v2v_xml_xpathobj_ptr_get_node_ptr (value xpathobjv, value iv) { CAMLparam2 (xpathobjv, iv); - xmlXPathObjectPtr xp...
2015 Jun 25
0
[PATCH] v2v: Free XML objects in the correct order.
...MLreturn (xpathobjv); } value -v2v_xml_xpathobj_nr_nodes (value xpathobjv) +v2v_xml_xpathobj_ptr_nr_nodes (value xpathobjv) { CAMLparam1 (xpathobjv); - xmlXPathObjectPtr xpathobj = Xpathobj_val (xpathobjv); + xmlXPathObjectPtr xpathobj = Xpathobj_ptr_val (xpathobjv); if (xpathobj->nodesetval == NULL) CAMLreturn (Val_int (0)); @@ -226,10 +229,10 @@ v2v_xml_xpathobj_nr_nodes (value xpathobjv) } value -v2v_xml_xpathobj_get_node_ptr (value xpathobjv, value iv) +v2v_xml_xpathobj_ptr_get_node_ptr (value xpathobjv, value iv) { CAMLparam2 (xpathobjv, iv); - xmlXPathObjectPtr xp...
2015 Jun 25
2
[PATCH v2] v2v: Free XML objects in the correct order.
In version 2: - No substantial change, I just tidied up the code a bit. - Removed one case where whitespace changes had crept in. Rich.
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 07
0
[PATCH v4 2/9] lib: extract osinfo DB traversing API
...bj = xmlXPathEvalExpression (BAD_CAST "/libosinfo/os/media/iso", + xpathCtx); + if (xpathObj == NULL) { + error (g, _("osinfo: %s: unable to evaluate XPath expression"), + pathname); + return -1; + } + + nodes = xpathObj->nodesetval; + + if (nodes != NULL) { + for (i = 0; i < (size_t) nodes->nodeNr; ++i) { + iso_node = nodes->nodeTab[i]; + assert (iso_node != NULL); + assert (STREQ ((const char *) iso_node->name, "iso")); + assert (iso_node->type == XML_ELEMENT_NODE); + +...
2017 Feb 10
0
[PATCH v3 05/10] lib: extract osinfo DB traversing API
...bj = xmlXPathEvalExpression (BAD_CAST "/libosinfo/os/media/iso", + xpathCtx); + if (xpathObj == NULL) { + error (g, _("osinfo: %s: unable to evaluate XPath expression"), + pathname); + return -1; + } + + nodes = xpathObj->nodesetval; + + if (nodes != NULL) { + for (i = 0; i < (size_t) nodes->nodeNr; ++i) { + iso_node = nodes->nodeTab[i]; + assert (iso_node != NULL); + assert (STREQ ((const char *) iso_node->name, "iso")); + assert (iso_node->type == XML_ELEMENT_NODE); + +...