diff --git a/configure.ac b/configure.ac index b2960b885f3597ab30e558df97fd0d7dc7a78ddc..9730de7e9984195b682bd5f667c9c7d5ac86c84f 100644 --- a/configure.ac +++ b/configure.ac @@ -2336,11 +2336,11 @@ if test "x$with_udev" = "xyes" || test "x$with_udev" = "xcheck"; then ]) fi if test "x$with_udev" = "xyes" ; then - AC_DEFINE_UNQUOTED([HAVE_UDEV], 1, + AC_DEFINE_UNQUOTED([WITH_UDEV], 1, [use UDEV for host device enumeration]) fi fi -AM_CONDITIONAL([HAVE_UDEV], [test "x$with_udev" = "xyes"]) +AM_CONDITIONAL([WITH_UDEV], [test "x$with_udev" = "xyes"]) AC_SUBST([UDEV_CFLAGS]) AC_SUBST([UDEV_LIBS]) AC_SUBST([PCIACCESS_CFLAGS]) diff --git a/src/Makefile.am b/src/Makefile.am index e9726716d85785d9d70e2d6b15d09388d6286f51..e9f3fe3baf021810f4d0d14ad16f5542fe9d881c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -620,7 +620,7 @@ if WITH_NETCF INTERFACE_DRIVER_SOURCES += \ interface/interface_backend_netcf.c endif -if HAVE_UDEV +if WITH_UDEV INTERFACE_DRIVER_SOURCES += \ interface/interface_backend_udev.c endif @@ -1108,7 +1108,7 @@ if WITH_NETCF libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS) libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS) else -if HAVE_UDEV +if WITH_UDEV libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS) libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS) endif @@ -1222,7 +1222,7 @@ libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_HAL_SOURCES) libvirt_driver_nodedev_la_CFLAGS += $(HAL_CFLAGS) libvirt_driver_nodedev_la_LIBADD += $(HAL_LIBS) endif -if HAVE_UDEV +if WITH_UDEV libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_UDEV_SOURCES) libvirt_driver_nodedev_la_CFLAGS += $(UDEV_CFLAGS) $(PCIACCESS_CFLAGS) libvirt_driver_nodedev_la_LIBADD += $(UDEV_LIBS) $(PCIACCESS_LIBS) diff --git a/src/interface/interface_driver.c b/src/interface/interface_driver.c index fbf861e83a250d3427d2237aac7c62094575c1c8..5668a3f88cf08991e23ef78d9f246d03407ba688 100644 --- a/src/interface/interface_driver.c +++ b/src/interface/interface_driver.c @@ -28,10 +28,10 @@ interfaceRegister(void) { if (netcfIfaceRegister() == 0) return 0; #endif /* WITH_NETCF */ -#if HAVE_UDEV +#if WITH_UDEV /* If there's no netcf or it failed to load, register the udev backend */ if (udevIfaceRegister() == 0) return 0; -#endif /* HAVE_UDEV */ +#endif /* WITH_UDEV */ return -1; } diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index 522af990e812077e57982207a0c09936c1544fb3..9c305a8c14320c987fc470d8ba61408c0cd205c1 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -681,7 +681,7 @@ out: } int nodedevRegister(void) { -#if defined(HAVE_HAL) && defined(HAVE_UDEV) +#if defined(HAVE_HAL) && defined(WITH_UDEV) /* Register only one of these two - they conflict */ if (udevNodeRegister() == -1) return halNodeRegister(); @@ -690,7 +690,7 @@ int nodedevRegister(void) { # ifdef HAVE_HAL return halNodeRegister(); # endif -# ifdef HAVE_UDEV +# ifdef WITH_UDEV return udevNodeRegister(); # endif #endif diff --git a/src/node_device/node_device_driver.h b/src/node_device/node_device_driver.h index 4cec07c58b3af9dd70a8a1850b7a48c5f3d41073..fa7bde1ccf41760aac94120592b5579cdaf93a9c 100644 --- a/src/node_device/node_device_driver.h +++ b/src/node_device/node_device_driver.h @@ -42,7 +42,7 @@ # ifdef HAVE_HAL int halNodeRegister(void); # endif -# ifdef HAVE_UDEV +# ifdef WITH_UDEV int udevNodeRegister(void); # endif diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c index 1a03c49ed0c721931a9bf2281f639aea1b36b6c1..90bbf59747e55e9eda4a88c0aa9231dc68fca524 100644 --- a/src/storage/storage_backend_scsi.c +++ b/src/storage/storage_backend_scsi.c @@ -166,7 +166,7 @@ static char * virStorageBackendSCSISerial(const char *dev) { char *serial = NULL; -#ifdef HAVE_UDEV +#ifdef WITH_UDEV virCommandPtr cmd = virCommandNewArgList( "/lib/udev/scsi_id", "--replace-whitespace", @@ -191,7 +191,7 @@ virStorageBackendSCSISerial(const char *dev) virReportOOMError(); } -#ifdef HAVE_UDEV +#ifdef WITH_UDEV cleanup: virCommandFree(cmd); #endif diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index c7941c359147eee5a4b72724ac63d517cb6a7eed..cdac5b1a5aaf567fe20e6a1869cc9d1781c30fc3 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1282,7 +1282,7 @@ int virStorageFileGetLVMKey(const char *path, } #endif -#ifdef HAVE_UDEV +#ifdef WITH_UDEV int virStorageFileGetSCSIKey(const char *path, char **key) { diff --git a/tools/virsh.c b/tools/virsh.c index 283194ac82353a09b0e0fa8bfe707e1a9704024c..e3bd6cab99d8b01bfddd9de62c62623d737c677d 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -2727,7 +2727,7 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED) vshPrint(ctl, " Interface"); # if defined(WITH_NETCF) vshPrint(ctl, " netcf"); -# elif defined(HAVE_UDEV) +# elif defined(WITH_UDEV) vshPrint(ctl, " udev"); # endif #endif