X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fdisk.c;h=58a1c189563f4d5ff5fcb01331b0f1eef51d9e5a;hp=e01e15069b27c1e23aaa27ba545172a9b0e45a21;hb=865f2eb31e8264edd9337bc63ac59f6c2fa3b5a7;hpb=dcb67fd746e550f73f4db4db2e2b24ff9788f209 diff --git a/src/disk.c b/src/disk.c index e01e1506..58a1c189 100644 --- a/src/disk.c +++ b/src/disk.c @@ -139,7 +139,7 @@ static int pnumdisk; #error "No applicable input method." #endif -#if HAVE_LIBUDEV +#if HAVE_UDEV_H #include static char *conf_udev_name_attr = NULL; @@ -173,7 +173,7 @@ static int disk_config(const char *key, const char *value) { "on Mach / Mac OS X and will be ignored."); #endif } else if (strcasecmp("UdevNameAttr", key) == 0) { -#if HAVE_LIBUDEV +#if HAVE_UDEV_H if (conf_udev_name_attr != NULL) { free(conf_udev_name_attr); conf_udev_name_attr = NULL; @@ -209,7 +209,7 @@ static int disk_init(void) { /* #endif HAVE_IOKIT_IOKITLIB_H */ #elif KERNEL_LINUX -#if HAVE_LIBUDEV +#if HAVE_UDEV_H if (conf_udev_name_attr != NULL) { handle_udev = udev_new(); if (handle_udev == NULL) { @@ -217,7 +217,7 @@ static int disk_init(void) { return (-1); } } -#endif /* HAVE_LIBUDEV */ +#endif /* HAVE_UDEV_H */ /* #endif KERNEL_LINUX */ #elif KERNEL_FREEBSD @@ -260,10 +260,10 @@ static int disk_init(void) { static int disk_shutdown(void) { #if KERNEL_LINUX -#if HAVE_LIBUDEV +#if HAVE_UDEV_H if (handle_udev != NULL) udev_unref(handle_udev); -#endif /* HAVE_LIBUDEV */ +#endif /* HAVE_UDEV_H */ #endif /* KERNEL_LINUX */ return (0); } /* int disk_shutdown */ @@ -325,7 +325,7 @@ static counter_t disk_calc_time_incr(counter_t delta_time, } #endif -#if HAVE_LIBUDEV +#if HAVE_UDEV_H /** * Attempt to provide an rename disk instance from an assigned udev attribute. * @@ -842,7 +842,7 @@ static int disk_read(void) { output_name = disk_name; -#if HAVE_LIBUDEV +#if HAVE_UDEV_H char *alt_name = NULL; if (conf_udev_name_attr != NULL) { alt_name = @@ -853,7 +853,7 @@ static int disk_read(void) { #endif if (ignorelist_match(ignorelist, output_name) != 0) { -#if HAVE_LIBUDEV +#if HAVE_UDEV_H /* release udev-based alternate name, if allocated */ sfree(alt_name); #endif @@ -879,7 +879,7 @@ static int disk_read(void) { submit_io_time(output_name, io_time, weighted_time); } /* if (is_disk) */ -#if HAVE_LIBUDEV +#if HAVE_UDEV_H /* release udev-based alternate name, if allocated */ sfree(alt_name); #endif