We have both in the code. Let's use only one format. Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- src/conf/domain_conf.c | 12 ++++++------ src/libxl/libxl_conf.c | 16 ++++++++-------- src/qemu/qemu_command.c | 28 ++++++++++++++-------------- src/qemu/qemu_migration.c | 4 ++-- src/vbox/vbox_common.c | 10 +++++----- src/vmx/vmx.c | 8 ++++---- src/vz/vz_sdk.c | 8 ++++---- src/xenconfig/xen_common.c | 14 +++++++------- src/xenconfig/xen_sxpr.c | 16 ++++++++-------- src/xenconfig/xen_xl.c | 8 ++++---- 10 files changed, 62 insertions(+), 62 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1dc45f4..b1b2bb9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -23845,21 +23845,21 @@ int virDomainGraphicsListenAppendAddress(virDomainGraphicsDefPtr def, const char *address) { - virDomainGraphicsListenDef gListen; + virDomainGraphicsListenDef glisten; - memset(&gListen, 0, sizeof(gListen)); + memset(&glisten, 0, sizeof(glisten)); - gListen.type = VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS; + glisten.type = VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS; - if (VIR_STRDUP(gListen.address, address) < 0) + if (VIR_STRDUP(glisten.address, address) < 0) goto error; - if (VIR_APPEND_ELEMENT_COPY(def->listens, def->nListens, gListen) < 0) + if (VIR_APPEND_ELEMENT_COPY(def->listens, def->nListens, glisten) < 0) goto error; return 0; error: - VIR_FREE(gListen.address); + VIR_FREE(glisten.address); return -1; } diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index c399f5c..13e56ac 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -1430,7 +1430,7 @@ libxlMakeVfb(virPortAllocatorPtr graphicsports, libxl_device_vfb *x_vfb) { unsigned short port; - virDomainGraphicsListenDefPtr gListen = NULL; + virDomainGraphicsListenDefPtr glisten = NULL; libxl_device_vfb_init(x_vfb); @@ -1457,11 +1457,11 @@ libxlMakeVfb(virPortAllocatorPtr graphicsports, } x_vfb->vnc.display = l_vfb->data.vnc.port - LIBXL_VNC_PORT_MIN; - if ((gListen = virDomainGraphicsGetListen(l_vfb, 0)) && - gListen->address) { + if ((glisten = virDomainGraphicsGetListen(l_vfb, 0)) && + glisten->address) { /* libxl_device_vfb_init() does VIR_STRDUP("127.0.0.1") */ VIR_FREE(x_vfb->vnc.listen); - if (VIR_STRDUP(x_vfb->vnc.listen, gListen->address) < 0) + if (VIR_STRDUP(x_vfb->vnc.listen, glisten->address) < 0) return -1; } if (VIR_STRDUP(x_vfb->vnc.passwd, l_vfb->data.vnc.auth.passwd) < 0) @@ -1551,7 +1551,7 @@ libxlMakeBuildInfoVfb(virPortAllocatorPtr graphicsports, for (i = 0; i < def->ngraphics; i++) { virDomainGraphicsDefPtr l_vfb = def->graphics[i]; unsigned short port; - virDomainGraphicsListenDefPtr gListen = NULL; + virDomainGraphicsListenDefPtr glisten = NULL; if (l_vfb->type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE) continue; @@ -1565,9 +1565,9 @@ libxlMakeBuildInfoVfb(virPortAllocatorPtr graphicsports, } b_info->u.hvm.spice.port = l_vfb->data.spice.port; - if ((gListen = virDomainGraphicsGetListen(l_vfb, 0)) && - gListen->address && - VIR_STRDUP(b_info->u.hvm.spice.host, gListen->address) < 0) + if ((glisten = virDomainGraphicsGetListen(l_vfb, 0)) && + glisten->address && + VIR_STRDUP(b_info->u.hvm.spice.host, glisten->address) < 0) return -1; if (VIR_STRDUP(b_info->u.hvm.keymap, l_vfb->data.spice.keymap) < 0) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 4a2fa1d..61ab30e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7383,7 +7383,7 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg, const char *domainLibDir) { virBuffer opt = VIR_BUFFER_INITIALIZER; - virDomainGraphicsListenDefPtr gListen = NULL; + virDomainGraphicsListenDefPtr glisten = NULL; const char *listenAddr = NULL; char *netAddr = NULL; bool escapeAddr; @@ -7416,18 +7416,18 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg, goto error; } - if ((gListen = virDomainGraphicsGetListen(graphics, 0))) { + if ((glisten = virDomainGraphicsGetListen(graphics, 0))) { - switch (gListen->type) { + switch (glisten->type) { case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS: - listenAddr = gListen->address; + listenAddr = glisten->address; break; case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK: - if (!gListen->network) + if (!glisten->network) break; - ret = networkGetNetworkAddress(gListen->network, &netAddr); + ret = networkGetNetworkAddress(glisten->network, &netAddr); if (ret <= -2) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("network-based listen not possible, " @@ -7440,7 +7440,7 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg, listenAddr = netAddr; /* store the address we found in the <graphics> element so it * will show up in status. */ - if (VIR_STRDUP(gListen->address, netAddr) < 0) + if (VIR_STRDUP(glisten->address, netAddr) < 0) goto error; break; @@ -7538,7 +7538,7 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg, virDomainGraphicsDefPtr graphics) { virBuffer opt = VIR_BUFFER_INITIALIZER; - virDomainGraphicsListenDefPtr gListen = NULL; + virDomainGraphicsListenDefPtr glisten = NULL; const char *listenAddr = NULL; char *netAddr = NULL; int ret; @@ -7577,18 +7577,18 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg, } if (port > 0 || tlsPort > 0) { - if ((gListen = virDomainGraphicsGetListen(graphics, 0))) { + if ((glisten = virDomainGraphicsGetListen(graphics, 0))) { - switch (gListen->type) { + switch (glisten->type) { case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS: - listenAddr = gListen->address; + listenAddr = glisten->address; break; case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK: - if (!gListen->network) + if (!glisten->network) break; - ret = networkGetNetworkAddress(gListen->network, &netAddr); + ret = networkGetNetworkAddress(glisten->network, &netAddr); if (ret <= -2) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("network-based listen not possible, " @@ -7601,7 +7601,7 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg, listenAddr = netAddr; /* store the address we found in the <graphics> element so it will * show up in status. */ - if (VIR_STRDUP(gListen->address, listenAddr) < 0) + if (VIR_STRDUP(glisten->address, listenAddr) < 0) goto error; break; diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 680c9ba..25093ac 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -319,7 +319,7 @@ qemuMigrationCookieGraphicsSpiceAlloc(virQEMUDriverPtr driver, { qemuMigrationCookieGraphicsPtr mig = NULL; const char *listenAddr; - virDomainGraphicsListenDefPtr gListen = virDomainGraphicsGetListen(def, 0); + virDomainGraphicsListenDefPtr glisten = virDomainGraphicsGetListen(def, 0); virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver); if (VIR_ALLOC(mig) < 0) @@ -332,7 +332,7 @@ qemuMigrationCookieGraphicsSpiceAlloc(virQEMUDriverPtr driver, else mig->tlsPort = -1; - if (!gListen || !(listenAddr = gListen->address)) + if (!glisten || !(listenAddr = glisten->address)) listenAddr = cfg->spiceListen; #ifdef WITH_GNUTLS diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 13c3fec..ee2b6ad 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -1579,7 +1579,7 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) char *guiDisplay = NULL; char *sdlDisplay = NULL; size_t i = 0; - virDomainGraphicsListenDefPtr gListen; + virDomainGraphicsListenDefPtr glisten; for (i = 0; i < def->ngraphics; i++) { IVRDxServer *VRDxServer = NULL; @@ -1607,15 +1607,15 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) VIR_DEBUG("VRDP set to allow multiple connection"); } - if ((gListen = virDomainGraphicsGetListen(def->graphics[i], 0)) && - gListen->address) { + if ((glisten = virDomainGraphicsGetListen(def->graphics[i], 0)) && + glisten->address) { PRUnichar *netAddressUtf16 = NULL; - VBOX_UTF8_TO_UTF16(gListen->address, &netAddressUtf16); + VBOX_UTF8_TO_UTF16(glisten->address, &netAddressUtf16); gVBoxAPI.UIVRDxServer.SetNetAddress(data, VRDxServer, netAddressUtf16); VIR_DEBUG("VRDP listen address is set to: %s", - gListen->address); + glisten->address); VBOX_UTF16_FREE(netAddressUtf16); } diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 6505dd7..f729e5d 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -3402,7 +3402,7 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virDomainDe int virVMXFormatVNC(virDomainGraphicsDefPtr def, virBufferPtr buffer) { - virDomainGraphicsListenDefPtr gListen; + virDomainGraphicsListenDefPtr glisten; if (def->type != VIR_DOMAIN_GRAPHICS_TYPE_VNC) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument")); @@ -3424,10 +3424,10 @@ virVMXFormatVNC(virDomainGraphicsDefPtr def, virBufferPtr buffer) def->data.vnc.port); } - if ((gListen = virDomainGraphicsGetListen(def, 0)) && - gListen->address) { + if ((glisten = virDomainGraphicsGetListen(def, 0)) && + glisten->address) { virBufferAsprintf(buffer, "RemoteDisplay.vnc.ip = \"%s\"\n", - gListen->address); + glisten->address); } if (def->data.vnc.keymap != NULL) { diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 2275572..9aa5a76 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -2683,7 +2683,7 @@ static int prlsdkCheckFSUnsupportedParams(virDomainFSDefPtr fs) static int prlsdkApplyGraphicsParams(PRL_HANDLE sdkdom, virDomainDefPtr def) { virDomainGraphicsDefPtr gr; - virDomainGraphicsListenDefPtr gListen; + virDomainGraphicsListenDefPtr glisten; PRL_RESULT pret; int ret = -1; @@ -2706,10 +2706,10 @@ static int prlsdkApplyGraphicsParams(PRL_HANDLE sdkdom, virDomainDefPtr def) prlsdkCheckRetGoto(pret, cleanup); } - if ((gListen = virDomainGraphicsGetListen(gr, 0))) { - if (!gListen->address) + if ((glisten = virDomainGraphicsGetListen(gr, 0))) { + if (!glisten->address) goto cleanup; - pret = PrlVmCfg_SetVNCHostName(sdkdom, gListen->address); + pret = PrlVmCfg_SetVNCHostName(sdkdom, glisten->address); prlsdkCheckRetGoto(pret, cleanup); } diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 5014bad..a568666 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -1643,7 +1643,7 @@ xenFormatVfb(virConfPtr conf, virDomainDefPtr def) def->graphics[0]->data.sdl.xauth) < 0) return -1; } else { - virDomainGraphicsListenDefPtr gListen; + virDomainGraphicsListenDefPtr glisten; if (xenConfigSetInt(conf, "sdl", 0) < 0) return -1; @@ -1660,9 +1660,9 @@ xenFormatVfb(virConfPtr conf, virDomainDefPtr def) def->graphics[0]->data.vnc.port - 5900) < 0) return -1; - if ((gListen = virDomainGraphicsGetListen(def->graphics[0], 0)) && - gListen->address && - xenConfigSetString(conf, "vnclisten", gListen->address) < 0) + if ((glisten = virDomainGraphicsGetListen(def->graphics[0], 0)) && + glisten->address && + xenConfigSetString(conf, "vnclisten", glisten->address) < 0) return -1; if (def->graphics[0]->data.vnc.auth.passwd && @@ -1689,7 +1689,7 @@ xenFormatVfb(virConfPtr conf, virDomainDefPtr def) virBufferAsprintf(&buf, ",xauthority=%s", def->graphics[0]->data.sdl.xauth); } else { - virDomainGraphicsListenDefPtr gListen + virDomainGraphicsListenDefPtr glisten = virDomainGraphicsGetListen(def->graphics[0], 0); virBufferAddLit(&buf, "type=vnc"); @@ -1698,8 +1698,8 @@ xenFormatVfb(virConfPtr conf, virDomainDefPtr def) if (!def->graphics[0]->data.vnc.autoport) virBufferAsprintf(&buf, ",vncdisplay=%d", def->graphics[0]->data.vnc.port - 5900); - if (gListen && gListen->address) - virBufferAsprintf(&buf, ",vnclisten=%s", gListen->address); + if (glisten && glisten->address) + virBufferAsprintf(&buf, ",vnclisten=%s", glisten->address); if (def->graphics[0]->data.vnc.auth.passwd) virBufferAsprintf(&buf, ",vncpasswd=%s", def->graphics[0]->data.vnc.auth.passwd); diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c index 8b5e063..6c7b2c7 100644 --- a/src/xenconfig/xen_sxpr.c +++ b/src/xenconfig/xen_sxpr.c @@ -1523,7 +1523,7 @@ static int xenFormatSxprGraphicsNew(virDomainGraphicsDefPtr def, virBufferPtr buf) { - virDomainGraphicsListenDefPtr gListen; + virDomainGraphicsListenDefPtr glisten; if (def->type != VIR_DOMAIN_GRAPHICS_TYPE_SDL && def->type != VIR_DOMAIN_GRAPHICS_TYPE_VNC) { @@ -1551,9 +1551,9 @@ xenFormatSxprGraphicsNew(virDomainGraphicsDefPtr def, virBufferAsprintf(buf, "(vncdisplay %d)", def->data.vnc.port-5900); } - if ((gListen = virDomainGraphicsGetListen(def, 0)) && - gListen->address) - virBufferAsprintf(buf, "(vnclisten '%s')", gListen->address); + if ((glisten = virDomainGraphicsGetListen(def, 0)) && + glisten->address) + virBufferAsprintf(buf, "(vnclisten '%s')", glisten->address); if (def->data.vnc.auth.passwd) virBufferAsprintf(buf, "(vncpasswd '%s')", def->data.vnc.auth.passwd); if (def->data.vnc.keymap) @@ -1579,7 +1579,7 @@ xenFormatSxprGraphicsNew(virDomainGraphicsDefPtr def, static int xenFormatSxprGraphicsOld(virDomainGraphicsDefPtr def, virBufferPtr buf) { - virDomainGraphicsListenDefPtr gListen; + virDomainGraphicsListenDefPtr glisten; if (def->type != VIR_DOMAIN_GRAPHICS_TYPE_SDL && def->type != VIR_DOMAIN_GRAPHICS_TYPE_VNC) { @@ -1604,9 +1604,9 @@ xenFormatSxprGraphicsOld(virDomainGraphicsDefPtr def, virBufferPtr buf) virBufferAsprintf(buf, "(vncdisplay %d)", def->data.vnc.port-5900); } - if ((gListen = virDomainGraphicsGetListen(def, 0)) && - gListen->address) - virBufferAsprintf(buf, "(vnclisten '%s')", gListen->address); + if ((glisten = virDomainGraphicsGetListen(def, 0)) && + glisten->address) + virBufferAsprintf(buf, "(vnclisten '%s')", glisten->address); if (def->data.vnc.auth.passwd) virBufferAsprintf(buf, "(vncpasswd '%s')", def->data.vnc.auth.passwd); if (def->data.vnc.keymap) diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index 15350f9..9b8306f 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -837,7 +837,7 @@ xenFormatXLDomainDisks(virConfPtr conf, virDomainDefPtr def) static int xenFormatXLSpice(virConfPtr conf, virDomainDefPtr def) { - virDomainGraphicsListenDefPtr gListen; + virDomainGraphicsListenDefPtr glisten; virDomainGraphicsDefPtr graphics; if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) { @@ -854,9 +854,9 @@ xenFormatXLSpice(virConfPtr conf, virDomainDefPtr def) if (xenConfigSetInt(conf, "spice", 1) < 0) return -1; - if ((gListen = virDomainGraphicsGetListen(graphics, 0)) && - gListen->address && - xenConfigSetString(conf, "spicehost", gListen->address) < 0) + if ((glisten = virDomainGraphicsGetListen(graphics, 0)) && + glisten->address && + xenConfigSetString(conf, "spicehost", glisten->address) < 0) return -1; if (xenConfigSetInt(conf, "spiceport", -- 2.8.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list