mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
Convert HAVE_UDEV to WITH_UDEV
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
bae47e4e30
commit
d3b05abfa9
@ -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])
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -42,7 +42,7 @@
|
||||
# ifdef HAVE_HAL
|
||||
int halNodeRegister(void);
|
||||
# endif
|
||||
# ifdef HAVE_UDEV
|
||||
# ifdef WITH_UDEV
|
||||
int udevNodeRegister(void);
|
||||
# endif
|
||||
|
||||
|
@ -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
|
||||
|
@ -1282,7 +1282,7 @@ int virStorageFileGetLVMKey(const char *path,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UDEV
|
||||
#ifdef WITH_UDEV
|
||||
int virStorageFileGetSCSIKey(const char *path,
|
||||
char **key)
|
||||
{
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user