From: BenoƮt Monin Date: Sat, 25 Apr 2015 10:02:44 +0000 (+0200) Subject: rrdfetch: fix options documentation and parsing X-Git-Tag: v1.5.3~5^2^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=372dec1585e71aae9f414982586459bfbd4ab1be;p=thirdparty%2Frrdtool-1.x.git rrdfetch: fix options documentation and parsing * Document option align-start and short option '-d' for daemon. * fix getopt: align-start don't take argument. * Add align-start to rrdtool help. --- diff --git a/doc/rrdfetch.pod b/doc/rrdfetch.pod index 47f06098..98cc6793 100644 --- a/doc/rrdfetch.pod +++ b/doc/rrdfetch.pod @@ -8,7 +8,8 @@ B B I I S<[B<--resolution>|B<-r> I]> S<[B<--start>|B<-s> I]> S<[B<--end>|B<-e> I]> -S<[B<--daemon> I
]> +S<[B<--align-start>|B<-a>]> +S<[B<--daemon>|B<-d> I
]> =head1 DESCRIPTION @@ -60,7 +61,7 @@ the need for external calculations described in L, though if a specific RRA is desired this will not ensure the start and end fall within its bounds. -=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_fetch.c b/src/rrd_fetch.c index ee25473c..ef8338e7 100644 --- a/src/rrd_fetch.c +++ b/src/rrd_fetch.c @@ -83,7 +83,7 @@ int rrd_fetch( {"resolution", required_argument, 0, 'r'}, {"start", required_argument, 0, 's'}, {"end", required_argument, 0, 'e'}, - {"align-start", optional_argument, 0, 'a'}, + {"align-start", no_argument, 0, 'a'}, {"daemon", required_argument, 0, 'd'}, {0, 0, 0, 0} }; diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 2a36082b..c39f9903 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -123,7 +123,8 @@ void PrintUsage( "\trrdtool fetch filename.rrd CF\n" "\t\t[-r|--resolution resolution]\n" "\t\t[-s|--start start] [-e|--end end]\n" - "\t\t[--daemon
]\n"); + "\t\t[-a|--align-start]\n" + "\t\t[-d|--daemon
]\n"); const char *help_flushcached = N_("* flushcached - flush cached data out to an RRD file\n\n"