X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fhddtemp.c;h=0a93920b99e4ce7e42c3d8a0b06c6fc91373c8e8;hb=8461fc51ea1af63b4d51c106d128716ecf95bf10;hp=c77746589858cef0941934727d336c9b12ce9514;hpb=7e5df1a2c6611bd4ac9fb8ac4b78106f9139ae6e;p=collectd.git diff --git a/src/hddtemp.c b/src/hddtemp.c index c7774658..0a93920b 100644 --- a/src/hddtemp.c +++ b/src/hddtemp.c @@ -31,17 +31,11 @@ #include "plugin.h" #include "configfile.h" -#if HAVE_NETDB_H && HAVE_SYS_SOCKET_H && HAVE_NETINET_IN_H \ - && HAVE_NETINET_TCP_H && HAVE_LIBGEN_H # include # include # include # include # include /* for basename */ -# define HDDTEMP_HAVE_READ 1 -#else -# define HDDTEMP_HAVE_READ 0 -#endif #if HAVE_LINUX_MAJOR_H # include @@ -50,7 +44,6 @@ #define HDDTEMP_DEF_HOST "127.0.0.1" #define HDDTEMP_DEF_PORT "7634" -#if HDDTEMP_HAVE_READ static const char *config_keys[] = { "Host", @@ -151,7 +144,7 @@ static int hddtemp_query_daemon (char *buffer, int buffer_size) if (connect (fd, (struct sockaddr *) ai_ptr->ai_addr, ai_ptr->ai_addrlen)) { char errbuf[1024]; - DEBUG ("hddtemp: connect (%s, %s): %s", host, port, + INFO ("hddtemp: connect (%s, %s): %s", host, port, sstrerror (errno, errbuf, sizeof (errbuf))); close (fd); fd = -1; @@ -507,16 +500,13 @@ static int hddtemp_read (void) return (0); } /* int hddtemp_read */ -#endif /* HDDTEMP_HAVE_READ */ /* module_register Register collectd plugin. */ void module_register (void) { -#if HDDTEMP_HAVE_READ plugin_register_config ("hddtemp", hddtemp_config, config_keys, config_keys_num); plugin_register_init ("hddtemp", hddtemp_init); plugin_register_read ("hddtemp", hddtemp_read); -#endif /* HDDTEMP_HAVE_READ */ }