[Pkg-libvirt-commits] [libguestfs] 04/26: inspector: fix formatting of xpath result (RHBZ#1212680)
Hilko Bengen
bengen at moszumanska.debian.org
Sun Nov 1 17:11:25 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag upstream/1.28.12
in repository libguestfs.
commit 71be122539ef82bdf9d7bc2543afc1ccce706e3b
Author: Pino Toscano <ptoscano at redhat.com>
Date: Wed Apr 29 14:57:22 2015 +0200
inspector: fix formatting of xpath result (RHBZ#1212680)
Discard blank nodes when reading the XML from stdin, while enabling
formatting in output nodes.
(cherry picked from commit 1f514f3466138b317028d5225ee53fe9cabfb9d7)
---
inspector/inspector.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/inspector/inspector.c b/inspector/inspector.c
index a9709c1..f8aa819 100644
--- a/inspector/inspector.c
+++ b/inspector/inspector.c
@@ -766,7 +766,7 @@ do_xpath (const char *query)
xmlSaveCtxtPtr saveCtx;
xmlNodePtr wrnode;
- doc = xmlReadFd (STDIN_FILENO, NULL, "utf8", 0);
+ doc = xmlReadFd (STDIN_FILENO, NULL, "utf8", XML_PARSE_NOBLANKS);
if (doc == NULL) {
fprintf (stderr, _("%s: unable to parse XML from stdin\n"), guestfs___program_name);
exit (EXIT_FAILURE);
@@ -792,7 +792,7 @@ do_xpath (const char *query)
if (nodes == NULL)
break;
- saveCtx = xmlSaveToFd (STDOUT_FILENO, NULL, XML_SAVE_NO_DECL);
+ saveCtx = xmlSaveToFd (STDOUT_FILENO, NULL, XML_SAVE_NO_DECL | XML_SAVE_FORMAT);
if (saveCtx == NULL) {
fprintf (stderr, _("%s: xmlSaveToFd failed\n"), guestfs___program_name);
exit (EXIT_FAILURE);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list