Code

make sure the image size only gets printed from rrd_tool when --imageinfo is NOT...
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 15 Jan 2006 12:31:03 +0000 (12:31 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 15 Jan 2006 12:31:03 +0000 (12:31 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@747 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/src/rrd_tool.c

index 2e0bf9cf92e30b050887d48fec2e97b4dd5368d3..81c4bae95ff4687d0b509cdd5f68d90f27014584 100644 (file)
@@ -650,8 +650,15 @@ int HandleInputLine(int argc, char **argv, FILE* out)
        double ymin,ymax;
        int i;
        int tostdout = (strcmp(argv[2],"-") == 0);      
+       int imginfo = 0;
+       for (i=2;i<argc;i++){
+               if (strcmp(argv[i],"--imginfo") == 0 || strcmp(argv[i],"-f") == 0){
+                       imginfo = 1;
+                       break;
+               }
+       }
        if( rrd_graph(argc-1, &argv[1], &calcpr, &xsize, &ysize, NULL, &ymin, &ymax) != -1 ) {
-           if (!tostdout) 
+           if (!tostdout && !imginfo
                printf ("%dx%d\n",xsize,ysize);
            if (calcpr) {
                for(i=0;calcpr[i];i++){