]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
rrdcreate: 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 short options '-O' for no_overwrite and '-d' for daemon.
* Add short options '-t' (template) and '-r' (source) to getopt.
* Add template, source and daemon to rrdtool help.

doc/rrdcreate.pod
src/rrd_create.c
src/rrd_tool.c

index b7b33ece9b162389aafdfc44f3b7c2bc50f4e1de..552e5b7294d36adbb3c0e148b00c667216fa8482 100644 (file)
@@ -9,8 +9,8 @@ S<[B<--start>|B<-b> I<start time>]>
 S<[B<--step>|B<-s> I<step>]>
 S<[B<--template>|B<-t> I<template-file>]>
 S<[B<--source>|B<-r> I<source-file>]>
-S<[B<--no-overwrite>]>
-S<[B<--daemon> I<address>]>
+S<[B<--no-overwrite>|B<-O>]>
+S<[B<--daemon>|B<-d> I<address>]>
 S<[B<DS:>I<ds-name>[B<=>I<mapped-ds-name>[B<[>I<source-index>B<]>]]B<:>I<DST>B<:>I<dst arguments>]>
 S<[B<RRA:>I<CF>B<:>I<cf arguments>]>
 
@@ -49,11 +49,11 @@ into the B<RRD>.
 A scaling factor may be present as a suffix to the integer; see
 L<"STEP, HEARTBEAT, and Rows As Durations">.
 
-=head2 B<--no-overwrite>
+=head2 B<--no-overwrite>|B<-O>
 
 Do not clobber an existing file of the same name.
 
-=head2 B<--daemon> I<address>
+=head2 B<--daemon>|B<-d> I<address>
 
 Address of the L<rrdcached> daemon.  For a list of accepted formats, see 
 the B<-l> option in the L<rrdcached> manual.
index 66480a261c0444b7487cf550aac975a64a898715..86ff3dcdfbf43c57699a25d57f77a382c1187284 100644 (file)
@@ -93,7 +93,7 @@ int rrd_create(
     opterr = 0;         /* initialize getopt */
 
     while (1) {
-        opt = getopt_long(argc, argv, "Ob:s:d:", long_options, &option_index);
+        opt = getopt_long(argc, argv, "b:s:d:r:t:O", long_options, &option_index);
 
         if (opt == EOF)
             break;
index 01e6a54a64b2c52e567ce2bd85632ce0d306464a..55fab7ca5f819134496962e5317dadc602975118 100644 (file)
@@ -64,7 +64,10 @@ void PrintUsage(
         N_("* create - create a new RRD\n\n"
            "\trrdtool create filename [--start|-b start time]\n"
            "\t\t[--step|-s step]\n"
+           "\t\t[--template|-t template-file]\n"
+           "\t\t[--source|-r source-file]\n"
            "\t\t[--no-overwrite|-O]\n"
+           "\t\t[--daemon|-d address]\n"
            "\t\t[DS:ds-name:DST:dst arguments]\n"
            "\t\t[RRA:CF:cf arguments]\n");