collectdctl: Improved error reporting.
authorSebastian Harl <sh@tokkee.org>
Mon, 9 Aug 2010 19:57:05 +0000 (21:57 +0200)
committerSebastian Harl <sh@tokkee.org>
Mon, 9 Aug 2010 19:57:05 +0000 (21:57 +0200)
src/collectdctl.c

index adf45c9..cc19509 100644 (file)
@@ -271,6 +271,10 @@ static int flush (lcc_connection_t *c, int argc, char **argv)
       if (status != 0)
         BAIL_OUT (status);
     }
+    else {
+      fprintf (stderr, "ERROR: flush: Unknown option `%s'.\n", key);
+      BAIL_OUT (-1);
+    }
   }
 
   if (plugins_num == 0) {