]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
fix: add -S short option for --step in rrdtool xport
authorThomas Vincent <thomasvincent@gmail.com>
Wed, 11 Mar 2026 03:48:42 +0000 (20:48 -0700)
committerThomas Vincent <thomasvincent@gmail.com>
Wed, 11 Mar 2026 04:38:09 +0000 (21:38 -0700)
rrdtool xport accepts --step but lacks a short form that other
rrdtool subcommands provide. Add -S as a short alias, consistent
with rrdtool graph which uses -S/--step and -s/--start.

-s is already taken by --start in xport, so -S (uppercase) is
the correct short form, matching rrd_graph_options() in rrd_graph.c.

Fixes #1103

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
doc/rrdxport.pod
src/rrd_xport.c

index 6c10108cda0ad6180d23c6ce711a22dd7e953f0d..fa4cd96db05837a00d8d0e4c67d4abb7a7d40832 100644 (file)
@@ -8,7 +8,7 @@ B<rrdtool> B<xport>
 S<[B<-s>|B<--start> I<seconds>]>
 S<[B<-e>|B<--end> I<seconds>]>
 S<[B<-m>|B<--maxrows> I<rows>]>
-S<[B<--step> I<value>]>
+S<[B<-S>|B<--step> I<value>]>
 S<[B<--json>]>
 S<[B<-t>|B<--showtime>]>
 S<[B<--enumds>]>
@@ -52,7 +52,7 @@ In fact it is exactly the same, but the parameter was renamed to
 describe its purpose in this module. See I<rrdgraph> documentation
 for details.
 
-=item B<--step> I<value> (default automatic)
+=item B<-S>|B<--step> I<value> (default automatic)
 
 See L<rrdgraph> documentation.
 
index 7bf677665d637a1a33db7637c03b0246b4e8b6fc..7606aaf6b9641c35371073ea88415d292d9531f1 100644 (file)
@@ -98,7 +98,7 @@ int rrd_xport(
         {"start", 's', OPTPARSE_REQUIRED},
         {"end", 'e', OPTPARSE_REQUIRED},
         {"maxrows", 'm', OPTPARSE_REQUIRED},
-        {"step", 261, OPTPARSE_REQUIRED},
+        {"step", 'S', OPTPARSE_REQUIRED},
         {"enumds", 262, OPTPARSE_NONE},
         {"json", 263, OPTPARSE_NONE},
         {"showtime", 't', OPTPARSE_NONE},
@@ -121,7 +121,7 @@ int rrd_xport(
     while ((opt = optparse_long(&options, longopts, NULL)) != -1) {
 
         switch (opt) {
-        case 261:
+        case 'S':
             im.step = atoi(options.optarg);
             break;
         case 262: