mirror of https://gitee.com/openkylin/libvirt.git
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>
|
||||
|
||||
* 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])
|
||||
AC_PATH_PROG([UDEVADM], [udevadm], [],
|
||||
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||
AC_PATH_PROG([UDEVSETTLE], [udevsettle], [],
|
||||
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||
|
||||
AC_DEFINE_UNQUOTED([DNSMASQ],["$DNSMASQ"],
|
||||
[Location or name of the dnsmasq program])
|
||||
|
@ -126,6 +128,10 @@ if test -n "$UDEVADM"; then
|
|||
AC_DEFINE_UNQUOTED([UDEVADM],["$UDEVADM"],
|
||||
[Location or name of the udevadm program])
|
||||
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 ?
|
||||
AC_ARG_WITH([html-dir], [AC_HELP_STRING([--with-html-dir=path],
|
||||
|
|
|
@ -270,13 +270,17 @@ virStorageBackendUpdateVolInfoFD(virConnectPtr conn,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef UDEVADM
|
||||
#if defined(UDEVADM) || defined(UDEVSETTLE)
|
||||
void virStorageBackendWaitForDevices(virConnectPtr conn)
|
||||
{
|
||||
#ifdef UDEVADM
|
||||
const char *const settleprog[] = { UDEVADM, "settle", NULL };
|
||||
#else
|
||||
const char *const settleprog[] = { UDEVSETTLE, NULL };
|
||||
#endif
|
||||
int exitstatus;
|
||||
|
||||
if (access(UDEVADM, X_OK) != 0)
|
||||
if (access(settleprog[0], X_OK) != 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue