From: BenoƮt Monin Date: Sat, 25 Apr 2015 10:02:44 +0000 (+0200) Subject: rrdcreate: fix options documentation and parsing X-Git-Tag: v1.5.3~5^2^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9631644c58a8de5ea4f7500295e6d90ea945ec56;p=thirdparty%2Frrdtool-1.x.git rrdcreate: fix options documentation and parsing * 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. --- diff --git a/doc/rrdcreate.pod b/doc/rrdcreate.pod index b7b33ece..552e5b72 100644 --- a/doc/rrdcreate.pod +++ b/doc/rrdcreate.pod @@ -9,8 +9,8 @@ S<[B<--start>|B<-b> I]> S<[B<--step>|B<-s> I]> S<[B<--template>|B<-t> I]> S<[B<--source>|B<-r> I]> -S<[B<--no-overwrite>]> -S<[B<--daemon> I
]> +S<[B<--no-overwrite>|B<-O>]> +S<[B<--daemon>|B<-d> I
]> S<[BI[B<=>I[B<[>IB<]>]]B<:>IB<:>I]> S<[BIB<:>I]> @@ -49,11 +49,11 @@ into the B. 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
+=head2 B<--daemon>|B<-d> I
Address of the L daemon. For a list of accepted formats, see the B<-l> option in the L manual. diff --git a/src/rrd_create.c b/src/rrd_create.c index 66480a26..86ff3dcd 100644 --- a/src/rrd_create.c +++ b/src/rrd_create.c @@ -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; diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 01e6a54a..55fab7ca 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -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");