-# endif /* HAVE_SWAPCTL_TWO_ARGS */
-
-/* If both methods are available, check the config variables to decide which
- * function to call. Otherwise, add aliases for the functions so we can
- * "swap_read" in "module_register". */
-# if HAVE_LIBKSTAT && HAVE_SWAPCTL && HAVE_SWAPCTL_TWO_ARGS
-static int swap_read (void) /* {{{ */
-{
- int status;
-
- if (!report_physical && !report_virtual)
- {
- WARNING ("swap plugin: Neither the \"ReportPhysical\" nor the \"ReportVirtual\" option "
- "has been activated. This plugin will not collect any data.");
- return (-1);
- }
-
- if (report_physical)
- {
- status = swap_read_swapctl2 ();
- if (status != 0)
- return (status);
- }
-
- if (report_virtual)
- {
- status = swap_read_kstat ();
- if (status != 0)
- return (status);
- }
-
- return (0);
-} /* }}} int swap_read */
-# elif HAVE_LIBKSTAT
-# define swap_read swap_read_kstat
-# else /* if HAVE_SWAPCTL && HAVE_SWAPCTL_TWO_ARGS */
-# define swap_read swap_read_swapctl2
-# endif
-/* #endif HAVE_LIBKSTAT || (HAVE_SWAPCTL && HAVE_SWAPCTL_TWO_ARGS) */