From: BenoƮt Monin Date: Sat, 25 Apr 2015 10:02:44 +0000 (+0200) Subject: rrddump: fix options documentation X-Git-Tag: v1.5.3~5^2^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=73fd65f5e275c33226058b159c4b43cf53af0458;p=thirdparty%2Frrdtool-1.x.git rrddump: fix options documentation * 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. --- diff --git a/doc/rrddump.pod b/doc/rrddump.pod index 1f29c61c..01516ebd 100644 --- a/doc/rrddump.pod +++ b/doc/rrddump.pod @@ -6,8 +6,8 @@ rrddump - dump the contents of an RRD to XML format B B I [I] S<[B<--header>|B<-h> {none,xsd,dtd}]> -S<[B<--no-header>]> -S<[B<--daemon> I
]> +S<[B<--no-header>|B<-n>]> +S<[B<--daemon>|B<-d> I
]> S<[E I]> =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
+=item B<--daemon>|B<-d> I
Address of the L daemon. If specified, a C command is sent to the server before reading the RRD files. This allows B to return diff --git a/src/rrd_dump.c b/src/rrd_dump.c index 406c7265..4d76580b 100644 --- a/src/rrd_dump.c +++ b/src/rrd_dump.c @@ -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); } diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 55fab7ca..2a36082b 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -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"