mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Older distributions (i.e. RHEL-5) don't have udevadm at all, but they do
have udevsettle. So change our tests to prefer udevadm if it exists, but to fall back to udevsettle if it does not. Signed-off-by: Chris Lalancette <clalance@redhat.com>
This commit is contained in:
parent
821b41f9f7
commit
a904a56c36
@ -1,3 +1,9 @@
|
|||||||
|
Tue Dec 2 13:45:00 CET 2008 Chris Lalancette <clalance@redhat.com>
|
||||||
|
* configure.in, src/storage_backend.c: Older distributions (i.e.
|
||||||
|
RHEL-5) don't have udevadm at all, but they do have udevsettle. So
|
||||||
|
change our tests to prefer udevadm if it exists, but to fall back to
|
||||||
|
udevsettle if it does not.
|
||||||
|
|
||||||
Tue Dec 2 11:34:22 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
Tue Dec 2 11:34:22 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* qemud/qemud.c: Registering network, storage & nodedev drivers
|
* qemud/qemud.c: Registering network, storage & nodedev drivers
|
||||||
|
@ -117,6 +117,8 @@ AC_PATH_PROG([BRCTL], [brctl], [brctl],
|
|||||||
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||||
AC_PATH_PROG([UDEVADM], [udevadm], [],
|
AC_PATH_PROG([UDEVADM], [udevadm], [],
|
||||||
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||||
|
AC_PATH_PROG([UDEVSETTLE], [udevsettle], [],
|
||||||
|
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([DNSMASQ],["$DNSMASQ"],
|
AC_DEFINE_UNQUOTED([DNSMASQ],["$DNSMASQ"],
|
||||||
[Location or name of the dnsmasq program])
|
[Location or name of the dnsmasq program])
|
||||||
@ -126,6 +128,10 @@ if test -n "$UDEVADM"; then
|
|||||||
AC_DEFINE_UNQUOTED([UDEVADM],["$UDEVADM"],
|
AC_DEFINE_UNQUOTED([UDEVADM],["$UDEVADM"],
|
||||||
[Location or name of the udevadm program])
|
[Location or name of the udevadm program])
|
||||||
fi
|
fi
|
||||||
|
if test -n "$UDEVSETTLE"; then
|
||||||
|
AC_DEFINE_UNQUOTED([UDEVSETTLE],["$UDEVSETTLE"],
|
||||||
|
[Location or name of the udevsettle program])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Specific dir for HTML output ?
|
dnl Specific dir for HTML output ?
|
||||||
AC_ARG_WITH([html-dir], [AC_HELP_STRING([--with-html-dir=path],
|
AC_ARG_WITH([html-dir], [AC_HELP_STRING([--with-html-dir=path],
|
||||||
|
@ -270,13 +270,17 @@ virStorageBackendUpdateVolInfoFD(virConnectPtr conn,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UDEVADM
|
#if defined(UDEVADM) || defined(UDEVSETTLE)
|
||||||
void virStorageBackendWaitForDevices(virConnectPtr conn)
|
void virStorageBackendWaitForDevices(virConnectPtr conn)
|
||||||
{
|
{
|
||||||
|
#ifdef UDEVADM
|
||||||
const char *const settleprog[] = { UDEVADM, "settle", NULL };
|
const char *const settleprog[] = { UDEVADM, "settle", NULL };
|
||||||
|
#else
|
||||||
|
const char *const settleprog[] = { UDEVSETTLE, NULL };
|
||||||
|
#endif
|
||||||
int exitstatus;
|
int exitstatus;
|
||||||
|
|
||||||
if (access(UDEVADM, X_OK) != 0)
|
if (access(settleprog[0], X_OK) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user