From 88b5acb67fe532e7cd31064d9eedeaac7b051850 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 19 May 2014 17:02:42 -0600 Subject: [PATCH] build: nuke more uses of 'sync' Commit d5c86278 was incomplete; other functions also triggered compiler warnings about collisions in the use of 'sync'. * src/qemu/qemu_driver.c (qemuDomainSetTime): Fix another client. * tools/virsh-domain-monitor.c (cmdDomTime): Likewise. Signed-off-by: Eric Blake --- src/qemu/qemu_driver.c | 4 ++-- tools/virsh-domain-monitor.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index cab653b5d6..c8a002977e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16598,7 +16598,7 @@ qemuDomainSetTime(virDomainPtr dom, virQEMUDriverPtr driver = dom->conn->privateData; qemuDomainObjPrivatePtr priv; virDomainObjPtr vm; - bool sync = flags & VIR_DOMAIN_TIME_SYNC; + bool rtcSync = flags & VIR_DOMAIN_TIME_SYNC; int ret = -1; int rv; @@ -16625,7 +16625,7 @@ qemuDomainSetTime(virDomainPtr dom, goto endjob; qemuDomainObjEnterAgent(vm); - rv = qemuAgentSetTime(priv->agent, seconds, nseconds, sync); + rv = qemuAgentSetTime(priv->agent, seconds, nseconds, rtcSync); qemuDomainObjExitAgent(vm); if (rv < 0) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index a3b66edac1..8bd58ad417 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -1400,7 +1400,7 @@ cmdDomTime(vshControl *ctl, const vshCmd *cmd) bool ret = false; bool now = vshCommandOptBool(cmd, "now"); bool pretty = vshCommandOptBool(cmd, "pretty"); - bool sync = vshCommandOptBool(cmd, "sync"); + bool rtcSync = vshCommandOptBool(cmd, "sync"); long long seconds = 0; unsigned int nseconds = 0; unsigned int flags = 0; @@ -1426,13 +1426,13 @@ cmdDomTime(vshControl *ctl, const vshCmd *cmd) doSet = true; } - if (doSet || now || sync) { + if (doSet || now || rtcSync) { if (now && ((seconds = time(NULL)) == (time_t) -1)) { vshError(ctl, _("Unable to get current time")); goto cleanup; } - if (sync) + if (rtcSync) flags |= VIR_DOMAIN_TIME_SYNC; if (virDomainSetTime(dom, seconds, nseconds, flags) < 0) -- GitLab