From cc8b5f1f6f47b9f0e4697c9f891c656e622a68a7 Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 3 Aug 2009 18:45:04 +0000 Subject: [PATCH] Show the index of each data source in the rrd_info output. Patch for #231 provided by unknown person. git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1877 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_info.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/program/src/rrd_info.c b/program/src/rrd_info.c index 3ab1b592..506dce32 100644 --- a/program/src/rrd_info.c +++ b/program/src/rrd_info.c @@ -178,6 +178,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), -- 2.30.2