X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=graph_def.c;h=a9ae806615926f79f43ceb4d50280f49c3afab08;hb=e850a3c5fb03dcb0e8698e61db2fd01a845bc6cf;hp=b8e0ce4e5402e9f76cf67ca879b15ef568418230;hpb=fab918278f2919ebc74a2f7b1a9db2bfeab46593;p=collection4.git diff --git a/graph_def.c b/graph_def.c index b8e0ce4..a9ae806 100644 --- a/graph_def.c +++ b/graph_def.c @@ -5,6 +5,7 @@ #include "graph_def.h" #include "graph.h" #include "graph_config.h" +#include "graph_ident.h" #include "common.h" #include "oconfig.h" @@ -219,9 +220,11 @@ int def_config (graph_config_t *cfg, const oconfig_item_t *ci) /* {{{ */ graph_config_get_bool (child, &def->area); else if (strcasecmp ("Format", child->key) == 0) graph_config_get_string (child, &def->format); +#if 0 else - fprintf (stderr, "def_config: Ignoring unknown config option \"%s\"", + fprintf (stderr, "def_config: Ignoring unknown config option \"%s\"\n", child->key); +#endif } return (graph_add_def (cfg, def)); @@ -332,13 +335,13 @@ int def_get_rrdargs (graph_def_t *def, graph_ident_t *ident, /* {{{ */ (def->legend != NULL) ? def->legend : def->ds_name, def->stack ? ":STACK" : ""); array_append_format (args, "GPRINT:vdef_%04i_min:%s min,", - index, (def->format != NULL) ? def->format : "%lg"); + index, (def->format != NULL) ? def->format : "%6.2lf"); array_append_format (args, "GPRINT:vdef_%04i_avg:%s avg,", - index, (def->format != NULL) ? def->format : "%lg"); + index, (def->format != NULL) ? def->format : "%6.2lf"); array_append_format (args, "GPRINT:vdef_%04i_max:%s max,", - index, (def->format != NULL) ? def->format : "%lg"); + index, (def->format != NULL) ? def->format : "%6.2lf"); array_append_format (args, "GPRINT:vdef_%04i_lst:%s last\\l", - index, (def->format != NULL) ? def->format : "%lg"); + index, (def->format != NULL) ? def->format : "%6.2lf"); free (file);