]> git.itanic.dy.fi Git - rrdd/commitdiff
script_parser: Print number of read bytes in the info message
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Wed, 22 Feb 2012 20:07:20 +0000 (22:07 +0200)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Wed, 22 Feb 2012 20:08:55 +0000 (22:08 +0200)
This is not strictly necessary, but might be useful. It also hides the
compiler warning about setting a variable but not reading it ever that
has become visible since gcc-4.6.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
parser.c

index 29e50945cdbfba066322a1f1616c9472db328047..76ee671eae24d6acb4f032e3402a3c041f51f152 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -168,7 +168,7 @@ int script_parser(char *rrd_data, void *parser_data)
        pid = run_piped_stream(cmd[0], &cmd[1], NULL, &readf, NULL);
        ret = fread(rrd_data, RRD_DATA_MAX_LEN, 1, readf);
 
-       pr_info("Read :%s\n", rrd_data);
+       pr_info("Read %d bytes :%s\n", ret, rrd_data);
        fclose(readf);
 
        harvest_zombies(pid);