From: Tobias Oetiker Date: Mon, 3 Aug 2009 18:45:04 +0000 (+0000) Subject: Show the index of each data source in the rrd_info output. Patch for #231 provided... X-Git-Tag: 1.3.9~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12a61f1404ab4785abdca4fa9d17d125d3f99f02;p=thirdparty%2Frrdtool-1.x.git Show the index of each data source in the rrd_info output. Patch for #231 provided by Glenn Herteg, GroundWork Open Source, Inc. git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3/program@1877 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_info.c b/src/rrd_info.c index 9ea68d4c..aac2263a 100644 --- a/src/rrd_info.c +++ b/src/rrd_info.c @@ -132,6 +132,11 @@ rrd_info_t *rrd_info_r( for (i = 0; i < rrd.stat_head->ds_cnt; i++) { + info.u_cnt=i; + cd=info_push(cd,sprintf_alloc("ds[%s].index", + rrd.ds_def[i].ds_nam), + RD_I_CNT, info); + info.u_str = rrd.ds_def[i].dst; cd = rrd_info_push(cd, sprintf_alloc("ds[%s].type", rrd.ds_def[i].ds_nam),