]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
rrddump: fix options documentation
authorBenoît Monin <benoit.monin@gmx.fr>
Sat, 25 Apr 2015 10:02:44 +0000 (12:02 +0200)
committerBenoît Monin <benoit.monin@gmx.fr>
Sat, 25 Apr 2015 20:54:51 +0000 (22:54 +0200)
* Document short options '-n' for no-header and '-d' for daemon.
* Add command line options to error message.
* Add command line options to rrdtool help.

doc/rrddump.pod
src/rrd_dump.c
src/rrd_tool.c

index 1f29c61c928326913b0f68c9e351ec2b96ca23b7..01516ebd369787141bba8b1e0bf222f6bb9e61e4 100644 (file)
@@ -6,8 +6,8 @@ rrddump - dump the contents of an RRD to XML format
 
 B<rrdtool> B<dump> I<filename.rrd> [I<filename.xml>]
 S<[B<--header>|B<-h> {none,xsd,dtd}]>
-S<[B<--no-header>]>
-S<[B<--daemon> I<address>]>
+S<[B<--no-header>|B<-n>]>
+S<[B<--daemon>|B<-d> I<address>]>
 S<[E<gt> I<filename.xml>]>
 
 =head1 DESCRIPTION
@@ -36,14 +36,14 @@ By default RRDtool will add a dtd header to the xml file. Here
 you can customize this to and xsd header or no header at all.
 
 
-=item B<--no-header>
+=item B<--no-header>|B<-n>
 
 A shortcut for S<--header=none>.
 
 If you want to restore the dump with RRDtool 1.2 you should use the
 S<--no-header> option since 1.2 can not deal with xml headers.
 
-=item B<--daemon> I<address>
+=item B<--daemon>|B<-d> I<address>
 
 Address of the L<rrdcached> daemon. If specified, a C<flush> command is sent
 to the server before reading the RRD files. This allows B<rrdtool> to return
index 406c7265b1fa732181d47c315d1f01a68884c287..4d76580b79b1a8eb3e8a973cfb150507c147bc29 100644 (file)
@@ -573,7 +573,9 @@ int rrd_dump(
           break;
 
         default:
-            rrd_set_error("usage rrdtool %s [--header|-h {none,xsd,dtd}] [--no-header]"
+            rrd_set_error("usage rrdtool %s [--header|-h {none,xsd,dtd}]\n"
+                          "[--no-header|-n]\n"
+                          "[--daemon|-d address]\n"
                           "file.rrd [file.xml]", argv[0]);
             return (-1);
             break;
@@ -581,8 +583,10 @@ int rrd_dump(
     }                   /* while (42) */
 
     if ((argc - optind) < 1 || (argc - optind) > 2) {
-        rrd_set_error("usage rrdtool %s [--header|-h {none,xsd,dtd}] [--no-header]"
-                      "file.rrd [file.xml]", argv[0]);
+        rrd_set_error("usage rrdtool %s [--header|-h {none,xsd,dtd}]\n"
+                      "[--no-header|-n]\n"
+                      "[--daemon|-d address]\n"
+                       "file.rrd [file.xml]", argv[0]);
         return (-1);
     }
 
index 55fab7ca5f819134496962e5317dadc602975118..2a36082b37623c7d0cb1d7f20aadeebdd93cfe20 100644 (file)
@@ -73,7 +73,10 @@ void PrintUsage(
 
     const char *help_dump =
         N_("* dump - dump an RRD to XML\n\n"
-           "\trrdtool dump filename.rrd >filename.xml\n");
+           "\trrdtool dump [--header|-h {none,xsd,dtd}]\n"
+           "\t\t[--no-header|-n]\n"
+           "\t\t[--daemon|-d address]\n"
+           "\t\tfile.rrd [file.xml]");
 
     const char *help_info =
         N_("* info - returns the configuration and status of the RRD\n\n"