]> xenbits.xensource.com Git - libvirt.git/commitdiff
Older distributions (i.e. RHEL-5) don't have udevadm at all, but they do
authorChris Lalancette <clalance@redhat.com>
Tue, 2 Dec 2008 12:41:29 +0000 (12:41 +0000)
committerChris Lalancette <clalance@redhat.com>
Tue, 2 Dec 2008 12:41:29 +0000 (12:41 +0000)
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>
ChangeLog
configure.in
src/storage_backend.c

index 4b08206922607426ac57c24a95f4d1be6de84afa..9d9c162e87023b25a6618fe5924235ee5f30c31c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 5359433a1f0280a54923ddc22ec11d4a7c3d52e0..0036145317240e9fba54afaddc740c6a38d58f70 100644 (file)
@@ -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],
index 6b4fa818cb6f4b31c05f9b7fcdeb182da0d272b9..bb247271c13e3caf50bb2510f38fa797d2cce14c 100644 (file)
@@ -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;
 
     /*