Convert HAVE_UDEV to WITH_UDEV

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2012-09-20 15:24:47 +01:00
parent bae47e4e30
commit d3b05abfa9
8 changed files with 14 additions and 14 deletions

View File

@ -2336,11 +2336,11 @@ if test "x$with_udev" = "xyes" || test "x$with_udev" = "xcheck"; then
]) ])
fi fi
if test "x$with_udev" = "xyes" ; then 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]) [use UDEV for host device enumeration])
fi fi
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_CFLAGS])
AC_SUBST([UDEV_LIBS]) AC_SUBST([UDEV_LIBS])
AC_SUBST([PCIACCESS_CFLAGS]) AC_SUBST([PCIACCESS_CFLAGS])

View File

@ -620,7 +620,7 @@ if WITH_NETCF
INTERFACE_DRIVER_SOURCES += \ INTERFACE_DRIVER_SOURCES += \
interface/interface_backend_netcf.c interface/interface_backend_netcf.c
endif endif
if HAVE_UDEV if WITH_UDEV
INTERFACE_DRIVER_SOURCES += \ INTERFACE_DRIVER_SOURCES += \
interface/interface_backend_udev.c interface/interface_backend_udev.c
endif endif
@ -1108,7 +1108,7 @@ if WITH_NETCF
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS) libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS) libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
else else
if HAVE_UDEV if WITH_UDEV
libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS) libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS) libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
endif 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_CFLAGS += $(HAL_CFLAGS)
libvirt_driver_nodedev_la_LIBADD += $(HAL_LIBS) libvirt_driver_nodedev_la_LIBADD += $(HAL_LIBS)
endif endif
if HAVE_UDEV if WITH_UDEV
libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_UDEV_SOURCES) libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_UDEV_SOURCES)
libvirt_driver_nodedev_la_CFLAGS += $(UDEV_CFLAGS) $(PCIACCESS_CFLAGS) libvirt_driver_nodedev_la_CFLAGS += $(UDEV_CFLAGS) $(PCIACCESS_CFLAGS)
libvirt_driver_nodedev_la_LIBADD += $(UDEV_LIBS) $(PCIACCESS_LIBS) libvirt_driver_nodedev_la_LIBADD += $(UDEV_LIBS) $(PCIACCESS_LIBS)

View File

@ -28,10 +28,10 @@ interfaceRegister(void) {
if (netcfIfaceRegister() == 0) if (netcfIfaceRegister() == 0)
return 0; return 0;
#endif /* WITH_NETCF */ #endif /* WITH_NETCF */
#if HAVE_UDEV #if WITH_UDEV
/* If there's no netcf or it failed to load, register the udev backend */ /* If there's no netcf or it failed to load, register the udev backend */
if (udevIfaceRegister() == 0) if (udevIfaceRegister() == 0)
return 0; return 0;
#endif /* HAVE_UDEV */ #endif /* WITH_UDEV */
return -1; return -1;
} }

View File

@ -681,7 +681,7 @@ out:
} }
int nodedevRegister(void) { 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 */ /* Register only one of these two - they conflict */
if (udevNodeRegister() == -1) if (udevNodeRegister() == -1)
return halNodeRegister(); return halNodeRegister();
@ -690,7 +690,7 @@ int nodedevRegister(void) {
# ifdef HAVE_HAL # ifdef HAVE_HAL
return halNodeRegister(); return halNodeRegister();
# endif # endif
# ifdef HAVE_UDEV # ifdef WITH_UDEV
return udevNodeRegister(); return udevNodeRegister();
# endif # endif
#endif #endif

View File

@ -42,7 +42,7 @@
# ifdef HAVE_HAL # ifdef HAVE_HAL
int halNodeRegister(void); int halNodeRegister(void);
# endif # endif
# ifdef HAVE_UDEV # ifdef WITH_UDEV
int udevNodeRegister(void); int udevNodeRegister(void);
# endif # endif

View File

@ -166,7 +166,7 @@ static char *
virStorageBackendSCSISerial(const char *dev) virStorageBackendSCSISerial(const char *dev)
{ {
char *serial = NULL; char *serial = NULL;
#ifdef HAVE_UDEV #ifdef WITH_UDEV
virCommandPtr cmd = virCommandNewArgList( virCommandPtr cmd = virCommandNewArgList(
"/lib/udev/scsi_id", "/lib/udev/scsi_id",
"--replace-whitespace", "--replace-whitespace",
@ -191,7 +191,7 @@ virStorageBackendSCSISerial(const char *dev)
virReportOOMError(); virReportOOMError();
} }
#ifdef HAVE_UDEV #ifdef WITH_UDEV
cleanup: cleanup:
virCommandFree(cmd); virCommandFree(cmd);
#endif #endif

View File

@ -1282,7 +1282,7 @@ int virStorageFileGetLVMKey(const char *path,
} }
#endif #endif
#ifdef HAVE_UDEV #ifdef WITH_UDEV
int virStorageFileGetSCSIKey(const char *path, int virStorageFileGetSCSIKey(const char *path,
char **key) char **key)
{ {

View File

@ -2727,7 +2727,7 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED)
vshPrint(ctl, " Interface"); vshPrint(ctl, " Interface");
# if defined(WITH_NETCF) # if defined(WITH_NETCF)
vshPrint(ctl, " netcf"); vshPrint(ctl, " netcf");
# elif defined(HAVE_UDEV) # elif defined(WITH_UDEV)
vshPrint(ctl, " udev"); vshPrint(ctl, " udev");
# endif # endif
#endif #endif