X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Firq.c;h=b6b8c4c6a92ea91121d58706845b7c8b5a3437b2;hb=96a9cd4acc079a5d070db9d83e80f551afeda4e8;hp=e39d0a5721d3bbdef2cbd4e6a9eafcc9d6c05ce9;hpb=39d723f4cb1d50b7ebb90c3251f0ebabad576412;p=collectd.git diff --git a/src/irq.c b/src/irq.c index e39d0a57..b6b8c4c6 100644 --- a/src/irq.c +++ b/src/irq.c @@ -25,12 +25,8 @@ #include "plugin.h" #include "configfile.h" -#define MODULE_NAME "irq" - -#if KERNEL_LINUX -# define IRQ_HAVE_READ 1 -#else -# define IRQ_HAVE_READ 0 +#if !KERNEL_LINUX +# error "No applicable input method." #endif #define BUFSIZE 128 @@ -38,17 +34,6 @@ /* * (Module-)Global variables */ -static data_source_t dsrc_irq[1] = -{ - {"value", DS_TYPE_COUNTER, 0, 65535.0} -}; - -static data_set_t ds_irq = -{ - "irq", 1, dsrc_irq -}; - -#if IRQ_HAVE_READ static const char *config_keys[] = { "Irq", @@ -160,8 +145,6 @@ static void irq_submit (unsigned int irq, counter_t value) static int irq_read (void) { -#if KERNEL_LINUX - #undef BUFSIZE #define BUFSIZE 256 @@ -210,22 +193,15 @@ static int irq_read (void) irq_submit (irq, irq_value); } fclose (fh); -#endif /* KERNEL_LINUX */ return (0); } /* int irq_read */ -#endif /* IRQ_HAVE_READ */ void module_register (void) { - plugin_register_data_set (&ds_irq); - -#if IRQ_HAVE_READ plugin_register_config ("irq", irq_config, config_keys, config_keys_num); plugin_register_read ("irq", irq_read); -#endif /* IRQ_HAVE_READ */ -} +} /* void module_register */ #undef BUFSIZE -#undef MODULE_NAME