Hello Tobi On 5/08/13 6:57 PM, "Tobias Oetiker" <[email protected]> wrote:
>Hi Peter, > >Today Peter Childs wrote: > >> >> Gday folks. >> >> I have been doing some testing of some options only in /trunk (not >>1.4.8) and have noticed that some of the applications I am testing that >>use 'rrdtool graph' are doing things like? >> >> AREA:inbits0#B6D14B:'eth0 In ': >> and >> AREA:outbits0_neg#A0A0E5:: >> >> Looking at http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html I >>would assume this sytnax is probably incorrect >> >> It appears from my testing 1.4.7 / 1.4.8 etc all "eat" these empty >>options without failing. >> >> 1.x/TRUNK appears to generate ERRORS, which cause the graphs to not be >>generated. >> >> My question would be in the interests of backward compatibility is >>there some 'half-way' point where warnings could be generated rather >>than errors? > >the argument parsing in trunk is all new, and still has some kinks >to have worked out. I think it would be find to just silently drop >'empty' arguments. That should take care of this problem ... > >what do you think ? I think that could be workable. I assume that 'knowing' that someone has put some rubbish into the syntax is an interesting idea which may prevent much nashing-of-teeth, but perhaps enabled by a debug or verbose flag (if such a thing exists). I'm not sure how syntax such as HRULE:foo#999999::dashes would go with the 'ignore unknown stuff' option.... Currently this works in 1.4.7/8 but doesn't on 'trunk' >cheers >tobi > > >> Regards, >> Peter >> >> >> $ diff -c src/rrd_graph_helper.c.orig src/rrd_graph_helper.c >> *** src/rrd_graph_helper.c.orig 2013-08-05 14:21:22.126330617 +0930 >> --- src/rrd_graph_helper.c 2013-08-05 14:50:11.046181137 +0930 >> *************** >> *** 1429,1435 **** >> /* check for unprocessed keyvalue args */ >> char *s; >> if ((s=checkUnusedValues(&pa))) { >> ! rrd_set_error("Unused Arguments in %s: %s",pa.arg_orig,s); >> freeParsedArguments(&pa); >> free(s); >> return; >> --- 1429,1435 ---- >> /* check for unprocessed keyvalue args */ >> char *s; >> if ((s=checkUnusedValues(&pa))) { >> ! //rrd_set_error("Unused Arguments in %s: %s",pa.arg_orig,s); >> freeParsedArguments(&pa); >> free(s); >> Return; >> >> >> >> >> > >-- >Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland >http://it.oetiker.ch [email protected] ++41 62 775 9902 / sb: -9900 _______________________________________________ rrd-developers mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
