From c0a24f3ad434468743b694bf5296dda00dcd94d2 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 28 Sep 2008 15:01:43 +0000 Subject: [PATCH] vdef calc was using end_orig to determine for which range it should do its calculations which is odd, since orig is only the requested range as invocation time and not the data range deliverd by fetch. It does fall completely flat when shifting since shifting does not affect the original data. Bug #177 reported by hokiel git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1530 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_graph.c | 9 ++------- program/src/rrd_tool.c | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index ea5d8c3b..da3be8a6 100644 --- a/program/src/rrd_graph.c +++ b/program/src/rrd_graph.c @@ -4523,21 +4523,16 @@ int vdef_calc( graph_desc_t *src, *dst; rrd_value_t *data; long step, steps; - unsigned long end; dst = &im->gdes[gdi]; src = &im->gdes[dst->vidx]; data = src->data + src->ds; - end = - src->end_orig % (long) src->step == - 0 ? src->end_orig : (src->end_orig + (long) src->step - - src->end_orig % (long) src->step); - steps = (end - src->start) / src->step; + steps = (src->end - src->start) / src->step; #if 0 printf ("DEBUG: start == %lu, end == %lu, %lu steps\n", - src->start, src->end_orig, steps); + src->start, src->end, steps); #endif switch (dst->vf.op) { case VDEF_PERCENT:{ diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c index d0543860..4da8019e 100644 --- a/program/src/rrd_tool.c +++ b/program/src/rrd_tool.c @@ -133,7 +133,7 @@ void PrintUsage( "\trrdtool graphv filename [-s|--start seconds] [-e|--end seconds]\n"); const char *help_graph1 = N_("\t\t[-x|--x-grid x-axis grid and label]\n" - "\t\t[-Y|--alt-y-grid]\n" + "\t\t[-Y|--alt-y-grid] [--full-size-mode]\n" "\t\t[-y|--y-grid y-axis grid and label]\n" "\t\t[-v|--vertical-label string] [-w|--width pixels]\n" "\t\t[-h|--height pixels] [-o|--logarithmic]\n" -- 2.30.2