[libvirt] [PATCH] Remove redundant monitorWatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For some reason there are two VMDef members being used to keep track of
monitor event handles: monitor_watch and monitorWatch. Remove the latter.

Thanks,
Cole
    s/monitorWatch/monitor_watch/g

diff --git a/src/domain_conf.h b/src/domain_conf.h
index b6f6b43..b20cdec 100644
--- a/src/domain_conf.h
+++ b/src/domain_conf.h
@@ -475,7 +475,6 @@ struct _virDomainObj {
     int monitor;
     int monitor_watch;
     char *monitorpath;
-    int monitorWatch;
     int logfile;
     int pid;
     int state;
diff --git a/src/lxc_driver.c b/src/lxc_driver.c
index aa417a9..fa6d61e 100644
--- a/src/lxc_driver.c
+++ b/src/lxc_driver.c
@@ -483,7 +483,7 @@ static int lxcVMCleanup(virConnectPtr conn,
         DEBUG("container exited with rc: %d", rc);
     }
 
-    virEventRemoveHandle(vm->monitorWatch);
+    virEventRemoveHandle(vm->monitor_watch);
     close(vm->monitor);
 
     virFileDeletePid(driver->stateDir, vm->def->name);
@@ -687,7 +687,7 @@ static void lxcMonitorEvent(int watch,
     for (i = 0 ; i < driver->domains.count ; i++) {
         virDomainObjPtr tmpvm = driver->domains.objs[i];
         virDomainObjLock(tmpvm);
-        if (tmpvm->monitorWatch == watch) {
+        if (tmpvm->monitor_watch == watch) {
             vm = tmpvm;
             break;
         }
@@ -913,7 +913,7 @@ static int lxcVmStart(virConnectPtr conn,
     vm->def->id = vm->pid;
     vm->state = VIR_DOMAIN_RUNNING;
 
-    if ((vm->monitorWatch = virEventAddHandle(
+    if ((vm->monitor_watch = virEventAddHandle(
              vm->monitor,
              VIR_EVENT_HANDLE_ERROR | VIR_EVENT_HANDLE_HANGUP,
              lxcMonitorEvent,
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]