search for: do_xpath

Displaying 12 results from an estimated 12 matches for "do_xpath".

2015 Nov 12
1
[PATCH] inspector: --xpath: Copy node to new document (RHBZ#1281577).
...it shows this error: ==2254== Invalid free() / delete / delete[] / realloc() ==2254== at 0x4C29D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==2254== by 0x53BA198: xmlFreeNodeList (tree.c:3690) ==2254== by 0x53B9F65: xmlFreeDoc (tree.c:1247) ==2254== by 0x405BFA: do_xpath (inspector.c:808) ==2254== by 0x405BFA: main (inspector.c:250) ==2254== Address 0x1030a037 is 311 bytes inside a block of size 1,048 alloc'd ==2254== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==2254== by 0x545DE86: xmlDictAddString.isra.0 (dict.c:...
2018 Oct 04
0
[PATCH v2 3/4] inspector: Use libxml writer macros.
...ot;display-options.h" +#include "libxml2-writer-macros.h" /* Currently open libguestfs handle. */ guestfs_h *g; @@ -69,6 +70,14 @@ static void output_drive_mappings (xmlTextWriterPtr xo, char *root); static void output_applications (xmlTextWriterPtr xo, char *root); static void do_xpath (const char *query); +/* This macro is used by the macros in "libxml2-writer-macros.h" + * when an error occurs. + */ +#define xml_error(fn) \ + error (EXIT_FAILURE, errno, \ + "%s:%d: error constr...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...tf (stderr, _("%s: cannot use --xpath together with other options.\n"), - guestfs_int_program_name); - exit (EXIT_FAILURE); - } + if (drvs != NULL) + error (EXIT_FAILURE, 0, + _("cannot use --xpath together with other options.")); do_xpath (xpath); @@ -280,11 +276,9 @@ main (int argc, char *argv[]) { CLEANUP_FREE_STRING_LIST char **roots = guestfs_inspect_os (g); - if (roots == NULL) { - fprintf (stderr, _("%s: no operating system could be detected inside this disk image.\n\nThis may be because the file is no...
2018 Oct 01
7
[PATCH v2 API PROPOSAL 0/5] inspection Add network interfaces to inspection data.
The proposed API is the same as v1, but this includes an implementation (for /etc/sysconfig/network-scripts/ifcfg-*) and modifications to virt-inspector. This compiles and works. If you look in patch 5 you can see proposed output as virt-inspector XML for a guest (although this guest has not been booted, so a real guest would hopefully have a hwaddr="MAC" attribute too). 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.
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
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...;description", - BAD_CAST apps->val[i].app2_description)); + xmlTextWriterWriteElement (xo, BAD_CAST "description", + BAD_CAST apps->val[i].app2_description)); XMLERROR (-1, xmlTextWriterEndElement (xo)); } @@ -770,7 +771,8 @@ do_xpath (const char *query) doc = xmlReadFd (STDIN_FILENO, NULL, "utf8", XML_PARSE_NOBLANKS); if (doc == NULL) { - fprintf (stderr, _("%s: unable to parse XML from stdin\n"), guestfs_int_program_name); + fprintf (stderr, _("%s: unable to parse XML from stdin\n"),...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but separating them is a lot of work. With *both* patches applied, all the tests and extra-tests pass. That's no guarantee however that there isn't a mistake, so I don't think this patch is a candidate for the 1.16 branch, until it's had a lot more testing in development. Rich.
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.