search for: nodetab

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

2016 Sep 20
1
[PATCH] libvirt: read disk paths from pools (RHBZ#1366049)
...* ./auth/secret/@usage || ./auth/secret/@uuid */ + } 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]; + + /* Get the source pool. Required. */ + xppool = xmlXPathEvalExpression (BAD_CAST "./source/@pool", + xpathCtx); + if (xppool == NULL || + xppool->nodesetval == NULL || + xppool->nodesetval-&g...
2016 Sep 22
1
[PATCH v2] libvirt: read disk paths from pools (RHBZ#1366049)
...ot;file", "block", or "network", skip it */ + } 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....
2016 Nov 16
3
[PATCH 1/2] libvirt: un-duplicate XPath code
...", 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 == XML_ATTRIBUTE_NODE); - attr = (xmlAttrPtr) xptype->nodesetval->nodeTab[0]; - type = (char *) xmlNodeListGetString (doc, attr->children, 1); + type = xPathObjectGetString (doc, xptype); if (STREQ (t...
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.
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
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 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
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
2015 Nov 12
1
[PATCH] inspector: --xpath: Copy node to new document (RHBZ#1281577).
...ector/inspector.c b/inspector/inspector.c index d0013ed..dd5be44 100644 --- a/inspector/inspector.c +++ b/inspector/inspector.c @@ -811,7 +811,7 @@ do_xpath (const char *query) guestfs_int_program_name); exit (EXIT_FAILURE); } - wrnode = xmlCopyNode (nodes->nodeTab[i], 1); + wrnode = xmlDocCopyNode (nodes->nodeTab[i], wrdoc, 1); if (wrnode == NULL) { fprintf (stderr, _("%s: xmlCopyNode failed\n"), guestfs_int_program_name); -- 2.5.0
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
2017 Mar 16
0
[PATCH 1/4] p2v: Pass host CPU details to virt-v2v.
...+ 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/cpu/model/text()", + xpathCtx); + if (xpathObj == NULL) { +...
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...ULL; int readonly; + int blocksize = 0; int t; virErrorPtr err; @@ -778,8 +784,17 @@ for_each_disk (guestfs_h *g, if (!xpath_object_is_empty (xpreadonly)) readonly = 1; + /* Get logical block size. Optional. */ + xpathCtx->node = nodes->nodeTab[i]; + xpformat = xmlXPathEvalExpression (BAD_CAST + "./blockio/@logical_block_size", + xpathCtx); + if (!xpath_object_is_empty (xpformat)) + blocksize = xpath_object_get_int (doc, xpformat); +...
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...ULL; int readonly; + int blocksize = 0; int t; virErrorPtr err; @@ -778,8 +784,17 @@ for_each_disk (guestfs_h *g, if (!xpath_object_is_empty (xpreadonly)) readonly = 1; + /* Get logical block size. Optional. */ + xpathCtx->node = nodes->nodeTab[i]; + xpformat = xmlXPathEvalExpression (BAD_CAST + "./blockio/@logical_block_size", + xpathCtx); + if (!xpath_object_is_empty (xpformat)) + blocksize = xpath_object_get_int (doc, xpformat); +...
2017 Mar 23
2
[PATCH] p2v: Use lscpu instead of libvirt to get CPU information.
...== 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 = xmlXPathEvalExpression (BAD_CAST xpathexpr, xpathCtx); - if (xpathObj == NULL) { - fpri...
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
...+ 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); + + media_node = iso_node->parent; + assert (media_node != NULL); + assert (STREQ ((const char *) media_node->...
2017 Feb 10
0
[PATCH v3 05/10] lib: extract osinfo DB traversing API
...+ 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); + + media_node = iso_node->parent; + assert (media_node != NULL); + assert (STREQ ((const char *) media_node->...
2017 Jun 19
0
[PATCH v7 2/9] lib: extract osinfo DB traversing API
...+ 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); + + media_node = iso_node->parent; + assert (media_node != NULL); + assert (STREQ ((const char *) media_node->...
2017 Apr 12
0
[PATCH v6 02/10] lib: extract osinfo DB traversing API
...+ 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); + + media_node = iso_node->parent; + assert (media_node != NULL); + assert (STREQ ((const char *) media_node->...
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