diff --git a/src/nfs.c b/src/nfs.c
index efe1e0243c55bd540aca566365be4fa4eef9247e..1dc64b78a1d948a2b9112ceb3c9484691f60042a 100644 (file)
--- a/src/nfs.c
+++ b/src/nfs.c
"nfs_procedure", 1, procedure_dsrc
};
+#if NFS_HAVE_READ
static const char *nfs2_procedures_names[] =
{
"null",
#endif
#define BUFSIZE 1024
-#if NFS_HAVE_READ
static void nfs_procedures_submit (const char *plugin_instance,
unsigned long long *val, const char **names, int len)
{
value_t values[1];
- value_list_t vl;
+ value_list_t vl = VALUE_LIST_INIT;
int i;
vl.values = values;
vl.values_len = 1;
vl.time = time (NULL);
- /* FIXME: do this globally */
- if (gethostname (vl.host, sizeof (vl.host)) != 0)
- {
- syslog (LOG_ERR, "load plugin: gethostname failed: %s",
- strerror (errno));
- return;
- }
+ strcpy (vl.host, hostname);
strcpy (vl.plugin, "nfs");
strncpy (vl.plugin_instance, plugin_instance,
sizeof (vl.plugin_instance));
plugin_dispatch_values ("nfs_procedure", &vl);
}
} /* void nfs_procedures_submit */
-#endif /* NFS_HAVE_READ */
#if KERNEL_LINUX
static void nfs_read_stats_file (FILE *fh, char *inst)
}
#endif
-#if NFS_HAVE_READ
static int nfs_read (void)
{
#if KERNEL_LINUX