From f74eee8aeaaaaefcea029e6df65f7f808958475a Mon Sep 17 00:00:00 2001 From: oetiker Date: Tue, 1 Aug 2006 13:08:33 +0000 Subject: [PATCH] unknownaszero was not a good idea ... bye bye git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@863 a5681a0c-68f1-0310-ab6d-d61299d08faa --- doc/rrdxport.pod | 4 ---- src/rrd_tool.c | 9 +-------- src/rrd_xport.c | 2 -- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/doc/rrdxport.pod b/doc/rrdxport.pod index f573815..a668a20 100644 --- a/doc/rrdxport.pod +++ b/doc/rrdxport.pod @@ -54,10 +54,6 @@ The generated xml should contain the data values in enumerated tags. valval -=item B<--unknwonaszero> - -Turn UNKNWON into '0' on output. - =item BIB<=>IB<:>IB<:>I See I documentation. diff --git a/src/rrd_tool.c b/src/rrd_tool.c index a331df7..cf29cd9 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -160,7 +160,6 @@ void PrintUsage(char *cmd) "\t\t[-m|--maxrows rows]\n" "\t\t[--step seconds]\n" "\t\t[--enumds]\n" - "\t\t[--unknownaszero]\n" "\t\t[DEF:vname=rrd:ds-name:CF]\n" "\t\t[CDEF:vname=rpn-expression]\n" "\t\t[XPORT:vname:legend]\n\n"; @@ -656,15 +655,12 @@ int HandleInputLine(int argc, char **argv, FILE* out) rrd_value_t *data,*ptr; char **legend_v; int enumds = 0; - int unknownaszero = 0; int i; char *vtag = NULL; vtag = malloc( strlen(COL_DATA_TAG)+10); for ( i = 2; i < argc; i++){ if (strcmp("--enumds", argv[i]) == 0) enumds = 1; - if (strcmp("--unknownaszero", argv[i]) == 0) - unknownaszero = 1; } if(rrd_xport(argc-1, &argv[1], &xxsize,&start,&end,&step,&col_cnt,&legend_v,&data) != -1) { @@ -701,10 +697,7 @@ int HandleInputLine(int argc, char **argv, FILE* out) rrd_value_t newval = DNAN; newval = *ptr; if(isnan(newval)){ - if (unknownaszero == 1) - printf("<%s>0", vtag,vtag); - else - printf("<%s>NaN", vtag,vtag); + printf("<%s>NaN", vtag,vtag); } else { printf("<%s>%0.10e", vtag, newval, vtag); }; diff --git a/src/rrd_xport.c b/src/rrd_xport.c index f427762..4fc0071 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -62,7 +62,6 @@ rrd_xport(int argc, char **argv, int UNUSED(*xsize), {"maxrows", required_argument, 0, 'm'}, {"step", required_argument, 0, 261}, {"enumds", no_argument, 0, 262}, /* these are handled in the frontend ... */ - {"unknownaszero", no_argument, 0, 263}, /* just ignore them here */ {0,0,0,0} }; int option_index = 0; @@ -79,7 +78,6 @@ rrd_xport(int argc, char **argv, int UNUSED(*xsize), im.step = atoi(optarg); break; case 262: - case 263: break; case 's': if ((parsetime_error = parsetime(optarg, &start_tv))) { -- 2.30.2