Blame SOURCES/0025-src-augrun.c-remove-unused-filename-argument-from-du.patch

ab36df
From ada0cd07eb449eb48b2fdf78f8e32f8a0a7199c9 Mon Sep 17 00:00:00 2001
ab36df
From: Dominic Cleal <dcleal@redhat.com>
ab36df
Date: Mon, 2 Jun 2014 16:05:30 +0100
ab36df
Subject: [PATCH] * src/augrun.c: remove unused "filename" argument from
ab36df
 dump-xml command
ab36df
ab36df
Fixes RHBZ#1100106
ab36df
ab36df
(cherry picked from commit e775e5f85183a76c584219b14963368a66171375)
ab36df
ab36df
Conflicts:
ab36df
	NEWS
ab36df
---
ab36df
 man/augtool.pod |  5 ++---
ab36df
 src/augrun.c    | 11 ++---------
ab36df
 2 files changed, 4 insertions(+), 12 deletions(-)
ab36df
ab36df
diff --git a/man/augtool.pod b/man/augtool.pod
ab36df
index 28f8563..44695ba 100644
ab36df
--- a/man/augtool.pod
ab36df
+++ b/man/augtool.pod
ab36df
@@ -165,11 +165,10 @@ The following commands are used to retrieve data from the Augeas tree.
ab36df
 
ab36df
 =over 4
ab36df
 
ab36df
-=item B<dump-xml> I<[E<lt>PATHE<gt>]> I<[E<lt>FILENAMEE<gt>]>
ab36df
+=item B<dump-xml> I<[E<lt>PATHE<gt>]>
ab36df
 
ab36df
 Print entries in the tree as XML. If PATH is given, printing starts there,
ab36df
-otherwise the whole tree is printed. If FILENAME is given, the XML is saved
ab36df
-to the given file.
ab36df
+otherwise the whole tree is printed.
ab36df
 
ab36df
 =item B<get> E<lt>PATHE<gt>
ab36df
 
ab36df
diff --git a/src/augrun.c b/src/augrun.c
ab36df
index 024d1fc..fd96409 100644
ab36df
--- a/src/augrun.c
ab36df
+++ b/src/augrun.c
ab36df
@@ -895,30 +895,23 @@ static const struct command_def cmd_print_def = {
ab36df
 
ab36df
 static void cmd_dump_xml(struct command *cmd) {
ab36df
     const char *path = arg_value(cmd, "path");
ab36df
-    const char *filename = arg_value(cmd, "filename");
ab36df
     xmlNodePtr xmldoc;
ab36df
     int r;
ab36df
 
ab36df
     r = aug_to_xml(cmd->aug, path, &xmldoc, 0);
ab36df
     if (r < 0)
ab36df
         ERR_REPORT(cmd, AUG_ECMDRUN,
ab36df
-                   "XML export of path %s to file %s failed", path, filename);
ab36df
+                   "XML export of path %s failed", path);
ab36df
 
ab36df
     xmlElemDump(stdout, NULL, xmldoc);
ab36df
     printf("\n");
ab36df
 
ab36df
-    if (filename != NULL) {
ab36df
-        printf("Saving to %s\n", filename);
ab36df
-    }
ab36df
-
ab36df
     xmlFreeNode(xmldoc);
ab36df
 }
ab36df
 
ab36df
 static const struct command_opt_def cmd_dump_xml_opts[] = {
ab36df
     { .type = CMD_PATH, .name = "path", .optional = true,
ab36df
       .help = "print this subtree" },
ab36df
-    { .type = CMD_NONE, .name = "filename", .optional = true,
ab36df
-      .help = "save to this file" },
ab36df
     CMD_OPT_DEF_LAST
ab36df
 };
ab36df
 
ab36df
@@ -927,7 +920,7 @@ static const struct command_def cmd_dump_xml_def = {
ab36df
     .opts = cmd_dump_xml_opts,
ab36df
     .handler = cmd_dump_xml,
ab36df
     .synopsis = "print a subtree as XML",
ab36df
-    .help = "Export entries in the tree as XML. If PATH is given, printing starts there,\n otherwise the whole tree is printed. If FILENAME is given, the XML is saved\n to the given file."
ab36df
+    .help = "Export entries in the tree as XML. If PATH is given, printing starts there,\n otherwise the whole tree is printed."
ab36df
 };
ab36df
 
ab36df
 static void cmd_transform(struct command *cmd) {