]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
rrdfetch: fix options documentation and parsing
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 option align-start and short option '-d' for daemon.
* fix getopt: align-start don't take argument.
* Add align-start to rrdtool help.

doc/rrdfetch.pod
src/rrd_fetch.c
src/rrd_tool.c

index 47f06098a9df3630471668f49b6cd2b240f168a9..98cc679338a72cd08e247abf99212b9e23c91bc8 100644 (file)
@@ -8,7 +8,8 @@ B<rrdtool> B<fetch> I<filename> I<CF>
 S<[B<--resolution>|B<-r> I<resolution>]>
 S<[B<--start>|B<-s> I<start>]>
 S<[B<--end>|B<-e> I<end>]>
-S<[B<--daemon> I<address>]>
+S<[B<--align-start>|B<-a>]>
+S<[B<--daemon>|B<-d> I<address>]>
 
 =head1 DESCRIPTION
 
@@ -60,7 +61,7 @@ the need for external calculations described in L<RESOLUTION
 INTERVAL>, though if a specific RRA is desired this will not ensure
 the start and end fall within its bounds.
 
-=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 ee25473c8f1f8d325fa6a8fa9882ca0ed9b8a372..ef8338e7ef01b03ed25195224f022cb18e7c11ae 100644 (file)
@@ -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}
     };
index 2a36082b37623c7d0cb1d7f20aadeebdd93cfe20..c39f99034fd23f73d2e6d3e40762a641a7a31237 100644 (file)
@@ -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 <address>]\n");
+           "\t\t[-a|--align-start]\n"
+           "\t\t[-d|--daemon <address>]\n");
 
     const char *help_flushcached =
         N_("* flushcached - flush cached data out to an RRD file\n\n"