提交 adecc8fc 编写于 作者: C Cole Robinson

Remove redundant monitor watch variable (s/monitor_watch/monitorWatch/)

上级 895247b7
Mon Mar 2 12:30:08 EST 2009 Cole Robinson <crobinso@redhat.com>
* src/domain_conf.c src/domain_conf.h src/qemu_driver.c:
Remove redundant monitor watch variable (s/monitor_watch/monitorWatch/)
Mon Mar 2 12:25:58 EST 2009 Cole Robinson <crobinso@redhat.com> Mon Mar 2 12:25:58 EST 2009 Cole Robinson <crobinso@redhat.com>
* src/network_driver.c src/network_conf.c: Mark 'defined' networks * src/network_driver.c src/network_conf.c: Mark 'defined' networks
......
...@@ -503,7 +503,7 @@ virDomainObjPtr virDomainAssignDef(virConnectPtr conn, ...@@ -503,7 +503,7 @@ virDomainObjPtr virDomainAssignDef(virConnectPtr conn,
virDomainObjLock(domain); virDomainObjLock(domain);
domain->state = VIR_DOMAIN_SHUTOFF; domain->state = VIR_DOMAIN_SHUTOFF;
domain->def = def; domain->def = def;
domain->monitor_watch = -1; domain->monitorWatch = -1;
domain->monitor = -1; domain->monitor = -1;
if (VIR_REALLOC_N(doms->objs, doms->count + 1) < 0) { if (VIR_REALLOC_N(doms->objs, doms->count + 1) < 0) {
......
...@@ -474,7 +474,6 @@ struct _virDomainObj { ...@@ -474,7 +474,6 @@ struct _virDomainObj {
virMutex lock; virMutex lock;
int monitor; int monitor;
int monitor_watch;
char *monitorpath; char *monitorpath;
int monitorWatch; int monitorWatch;
int logfile; int logfile;
......
...@@ -777,9 +777,9 @@ static int qemudOpenMonitor(virConnectPtr conn, ...@@ -777,9 +777,9 @@ static int qemudOpenMonitor(virConnectPtr conn,
goto error; goto error;
} }
if ((vm->monitor_watch = virEventAddHandle(vm->monitor, 0, if ((vm->monitorWatch = virEventAddHandle(vm->monitor, 0,
qemudDispatchVMEvent, qemudDispatchVMEvent,
driver, NULL)) < 0) driver, NULL)) < 0)
goto error; goto error;
...@@ -1331,9 +1331,9 @@ static void qemudShutdownVMDaemon(virConnectPtr conn ATTRIBUTE_UNUSED, ...@@ -1331,9 +1331,9 @@ static void qemudShutdownVMDaemon(virConnectPtr conn ATTRIBUTE_UNUSED,
_("Failed to send SIGTERM to %s (%d)"), _("Failed to send SIGTERM to %s (%d)"),
vm->def->name, vm->pid); vm->def->name, vm->pid);
if (vm->monitor_watch != -1) { if (vm->monitorWatch != -1) {
virEventRemoveHandle(vm->monitor_watch); virEventRemoveHandle(vm->monitorWatch);
vm->monitor_watch = -1; vm->monitorWatch = -1;
} }
if (close(vm->logfile) < 0) { if (close(vm->logfile) < 0) {
...@@ -1381,7 +1381,7 @@ qemudDispatchVMEvent(int watch, int fd, int events, void *opaque) { ...@@ -1381,7 +1381,7 @@ qemudDispatchVMEvent(int watch, int fd, int events, void *opaque) {
virDomainObjPtr tmpvm = driver->domains.objs[i]; virDomainObjPtr tmpvm = driver->domains.objs[i];
virDomainObjLock(tmpvm); virDomainObjLock(tmpvm);
if (virDomainIsActive(tmpvm) && if (virDomainIsActive(tmpvm) &&
tmpvm->monitor_watch == watch) { tmpvm->monitorWatch == watch) {
vm = tmpvm; vm = tmpvm;
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册