-static void partition_write (char *host, char *inst, char *val)
-{
- char file[512];
- int status;
-
- status = snprintf (file, 512, part_filename_template, inst);
- if (status < 1)
- return;
- else if (status >= 512)
- return;
-
- rrd_update_file (host, file, val, part_ds_def, part_ds_num);
-}
-
-#if DISK_HAVE_READ
-#define BUFSIZE 512
-static void disk_submit (char *disk_name,
- unsigned long long read_count,
- unsigned long long read_merged,
- unsigned long long read_bytes,
- unsigned long long read_time,
- unsigned long long write_count,
- unsigned long long write_merged,
- unsigned long long write_bytes,
- unsigned long long write_time)
-{
- char buf[BUFSIZE];
-
- if (snprintf (buf, BUFSIZE, "%u:%llu:%llu:%llu:%llu:%llu:%llu:%llu:%llu",
- (unsigned int) curtime,
- read_count, read_merged, read_bytes, read_time,
- write_count, write_merged, write_bytes,
- write_time) >= BUFSIZE)
- return;
-
- DBG ("disk_name = %s; buf = %s;",
- disk_name, buf);
-
- plugin_submit (MODULE_NAME, disk_name, buf);
-}
-
-#if KERNEL_LINUX || HAVE_LIBKSTAT
-static void partition_submit (char *part_name,
- unsigned long long read_count,
- unsigned long long read_bytes,
- unsigned long long write_count,
- unsigned long long write_bytes)
-{
- char buf[BUFSIZE];
-
- if (snprintf (buf, BUFSIZE, "%u:%llu:%llu:%llu:%llu",
- (unsigned int) curtime,
- read_count, read_bytes, write_count,
- write_bytes) >= BUFSIZE)
- return;
-
- plugin_submit ("partition", part_name, buf);
-}
-#endif /* KERNEL_LINUX || HAVE_LIBKSTAT */
-#undef BUFSIZE