`KERNEL_LINUX' and `KERNEL_SOLARIS' is now defined to `1' instead of <nothing>, so...
[collectd.git] / src / serial.c
index a823ecf..a95eb2d 100644 (file)
@@ -37,8 +37,8 @@ static char *serial_filename_template = "serial-%s.rrd";
 
 static char *ds_def[] =
 {
-       "DS:incoming:COUNTER:25:0:U",
-       "DS:outgoing:COUNTER:25:0:U",
+       "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+       "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:U",
        NULL
 };
 static int ds_num = 2;
@@ -62,6 +62,7 @@ static void serial_write (char *host, char *inst, char *val)
        rrd_update_file (host, file, val, ds_def, ds_num);
 }
 
+#if SERIAL_HAVE_READ
 #define BUFSIZE 512
 static void serial_submit (char *device,
                unsigned long long incoming,
@@ -77,7 +78,6 @@ static void serial_submit (char *device,
 }
 #undef BUFSIZE
 
-#if SERIAL_HAVE_READ
 static void serial_read (void)
 {
 #ifdef KERNEL_LINUX