[libvirt] [PATCH 13/28] Convert HAVE_UDEV to WITH_UDEV

Daniel P. Berrange berrange at redhat.com
Fri Jan 11 11:05:53 UTC 2013


From: "Daniel P. Berrange" <berrange at redhat.com>

Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 configure.ac                         | 4 ++--
 src/Makefile.am                      | 6 +++---
 src/interface/interface_driver.c     | 4 ++--
 src/node_device/node_device_driver.c | 4 ++--
 src/node_device/node_device_driver.h | 2 +-
 src/storage/storage_backend_scsi.c   | 4 ++--
 src/util/virstoragefile.c            | 2 +-
 tools/virsh.c                        | 2 +-
 8 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index b2960b8..9730de7 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 e972671..e9f3fe3 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 fbf861e..5668a3f 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 522af99..9c305a8 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 4cec07c..fa7bde1 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 1a03c49..90bbf59 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 c7941c3..cdac5b1 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 283194a..e3bd6ca 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
-- 
1.7.11.7




More information about the libvir-list mailing list