]> git.itanic.dy.fi Git - log-plotter/commitdiff
data.c: Reduce excess debug verbosity
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sun, 3 Nov 2013 19:55:24 +0000 (21:55 +0200)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sun, 3 Nov 2013 19:56:39 +0000 (21:56 +0200)
We trust now that the data parsing works. No need to print that many
lines of debug print.

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

diff --git a/data.c b/data.c
index 81a8345743d4552109fd2950161d9a461d090c69..b663cd50f5daed521764504e38f1f9646a00635f 100644 (file)
--- a/data.c
+++ b/data.c
@@ -80,8 +80,6 @@ static int parse_logline(const char *buf, struct charger_data *data)
 
        entry_count = separate_entries(str, entries, ARRAY_SIZE(entries));
 
-       pr_debug("Entry count: %d\n", entry_count);
-
        init_data(data);
 
        if (entries[0][0] != '$') {
@@ -89,9 +87,6 @@ static int parse_logline(const char *buf, struct charger_data *data)
                goto out;
        }
 
-       for (i = 0; i < entry_count; i++)
-               pr_debug("Entry %d: data: %s\n", i, entries[i]);
-
        i = 0;
        entries[i]++; /* discard the dollar sign */
        data->channel = atoi(entries[i++]);
@@ -260,7 +255,6 @@ static int read_data(struct eventhandler_entry *h)
        dt = container_of(h, struct dataparser_struct, evhandler);
 
        ret = read_log_line(dt->infd, dt->buf, sizeof(dt->buf), &dt->offset);
-       pr_debug("Line now %d: %s\n", dt->offset, dt->buf);
        if (ret <= 0)
                return ret;
 
@@ -286,7 +280,8 @@ static int read_data(struct eventhandler_entry *h)
 
        print_status_line(&data);
 
-       dump_data(&data);
+       if (0)
+               dump_data(&data);
 
        if (!dt->outfd)
                return 0;