]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix recording of UML driver watch to make inotify work
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 2 Dec 2008 11:23:27 +0000 (11:23 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 2 Dec 2008 11:23:27 +0000 (11:23 +0000)
ChangeLog
src/uml_driver.c

index e1e8e95b0eaafc92058c20058baae46f6a6ceac9..acac38d61e8f80282bbeb405f2577892db4033e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-Mon, 1 Dec 2008 16:01:54 +0100 Jim Meyering <meyering@redhat.com>
+Tue Dec 2 11:21:22 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
+
+       * src/uml_driver.c: Fix recording of watch number to make
+       inotify actually work.
+
+Mon Dec 1 16:01:54 +0100 2008 Jim Meyering <meyering@redhat.com>
 
        tests: daemon-conf: accommodate numeric-valued config params
        This test would hang when failing to perturb the soon-to-be-
@@ -16,7 +21,7 @@ Mon, 1 Dec 2008 16:01:54 +0100 Jim Meyering <meyering@redhat.com>
        * qemud/libvirtd.conf: Normalize the spacing around each setting
        that is to be perturbed by tests/daemon-conf.
 
-Mon, 1 Dec 2008 10:30:10 +0100 Jim Meyering <meyering@redhat.com>
+Mon Dec 1 10:30:10 +0100 2008 Jim Meyering <meyering@redhat.com>
 
        uml: don't free an uninitialized variable
        * src/uml_driver.c (umlDomainShutdown): Initialize "info".
index dcf3f66081596866f03d09e76fa358bb96afc204..9dd308231ab60c66da956cc8946314149981062c 100644 (file)
@@ -348,16 +348,16 @@ umlStartup(void) {
         return -1;
     }
 
-    if ((uml_driver->inotifyWatch =
-         inotify_add_watch(uml_driver->inotifyFD,
-                           uml_driver->monitorDir,
-                           IN_CREATE | IN_MODIFY | IN_DELETE)) < 0) {
+    if (inotify_add_watch(uml_driver->inotifyFD,
+                          uml_driver->monitorDir,
+                          IN_CREATE | IN_MODIFY | IN_DELETE) < 0) {
         umlShutdown();
         return -1;
     }
 
-    if (virEventAddHandle(uml_driver->inotifyFD, POLLIN,
-                          umlInotifyEvent, uml_driver, NULL) < 0) {
+    if ((uml_driver->inotifyWatch =
+         virEventAddHandle(uml_driver->inotifyFD, POLLIN,
+                           umlInotifyEvent, uml_driver, NULL)) < 0) {
         umlShutdown();
         return -1;
     }