Code

Imported Upstream version 1.4.7
[pkg-rrdtool.git] / src / rrd_fetch.c
index 2c30a980735dd40f24b6fb575672ea6e8c1ef865..cf5dc2499898f6e31d85ac07e2ba6d8b923cc05d 100644 (file)
@@ -1,9 +1,9 @@
 /*****************************************************************************
- * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
+ * RRDtool 1.4.7  Copyright by Tobi Oetiker, 1997-2012
  *****************************************************************************
  * rrd_fetch.c  read date from an rrd to use for further processing
  *****************************************************************************
- * $Id$
+ * $Id: rrd_fetch.c 2267 2012-01-24 10:08:48Z oetiker $
  * $Log$
  * Revision 1.8  2004/05/18 18:53:03  oetiker
  * big spell checking patch -- slif@bellsouth.net
@@ -163,7 +163,7 @@ int rrd_fetch(
     *step = step_tmp;
 
     if (optind + 1 >= argc) {
-        rrd_set_error("not enough arguments");
+        rrd_set_error("Usage: rrdtool %s <file> <CF> [options]", argv[0]);
         return -1;
     }
 
@@ -237,10 +237,8 @@ int rrd_fetch_fn(
 
 #ifdef HAVE_LIBDBI
     /* handle libdbi datasources */
-    if (strncmp("sql",filename,3)==0) {
-      if (filename[3]==filename[4]) {
+    if (strncmp("sql//",filename,5)==0) {
        return rrd_fetch_fn_libdbi(filename,cf_idx,start,end,step,ds_cnt,ds_namv,data);
-      }
     }
 #endif