let rrd_graph return the actual value range it picked ...
[rrdtool.git] / src / rrd_tool.c
index 9ea38ce..94c2b15 100644 (file)
@@ -543,7 +543,7 @@ int HandleInputLine(int argc, char **argv, FILE* out)
     else if (strcmp("resize", argv[1]) == 0)
        rrd_resize(argc-1, &argv[1]);
     else if (strcmp("last", argv[1]) == 0)
-        printf("%ld\n",rrd_last(argc-1, argv[1]));
+        printf("%ld\n",rrd_last(argc-1, &argv[1]));
     else if (strcmp("update", argv[1]) == 0)
        rrd_update(argc-1, &argv[1]);
     else if (strcmp("fetch", argv[1]) == 0) {
@@ -623,9 +623,10 @@ int HandleInputLine(int argc, char **argv, FILE* out)
        const char *imgfile = argv[2]; /* rrd_graph changes argv pointer */
 #endif
        int xsize, ysize;
+       double ymin,ymax;
        int i;
        int tostdout = (strcmp(argv[2],"-") == 0);      
-       if( rrd_graph(argc-1, &argv[1], &calcpr, &xsize, &ysize, NULL) != -1 ) {
+       if( rrd_graph(argc-1, &argv[1], &calcpr, &xsize, &ysize, NULL, &ymin, &ymax) != -1 ) {
            if (!tostdout) 
                printf ("%dx%d\n",xsize,ysize);
            if (calcpr) {