Removed the `XXX_HAVE_READ' defines from all plugins.
[collectd.git] / src / wireless.c
index 8ce7854..09df407 100644 (file)
 #include "common.h"
 #include "plugin.h"
 
-#if defined(KERNEL_LINUX)
-# define WIRELESS_HAVE_READ 1
-#else
-# define WIRELESS_HAVE_READ 0
+#if !KERNEL_LINUX
+# error "No applicable input method."
 #endif
 
 #define WIRELESS_PROC_FILE "/proc/net/wireless"
 
-static data_source_t data_source_quality[1] =
-{
-       {"value", DS_TYPE_GAUGE, 0, NAN}
-};
-
-static data_set_t quality_ds =
-{
-       "signal_quality", 1, data_source_quality
-};
-
-static data_source_t data_source_signal[1] =
-{
-       {"value", DS_TYPE_GAUGE, NAN, 0}
-};
-
-static data_set_t power_ds =
-{
-       "signal_power", 1, data_source_signal
-};
-
-static data_set_t noise_ds =
-{
-       "signal_noise", 1, data_source_signal
-};
-
-#if WIRELESS_HAVE_READ
 #if 0
 static double wireless_dbm_to_watt (double dbm)
 {
@@ -165,15 +137,8 @@ static int wireless_read (void)
 
        return (0);
 } /* int wireless_read */
-#endif /* WIRELESS_HAVE_READ */
 
 void module_register (void)
 {
-       plugin_register_data_set (&quality_ds);
-       plugin_register_data_set (&power_ds);
-       plugin_register_data_set (&noise_ds);
-
-#if WIRELESS_HAVE_READ
        plugin_register_read ("wireless", wireless_read);
-#endif /* WIRELESS_HAVE_READ */
-}
+} /* void module_register */