[rrd-developers] 1.4.x vs trunk handling of Unused Arguments
Tobias Oetiker
tobi at oetiker.ch
Mon Aug 5 11:27:26 CEST 2013
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 ?
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 tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-developers
mailing list