From nobody Tue Dec 16 13:49:57 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1740065520904243.90096181289346; Thu, 20 Feb 2025 07:32:00 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 3E3D52275; Thu, 20 Feb 2025 10:32:00 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id CA1B92196; Thu, 20 Feb 2025 10:27:03 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id DC1902195; Thu, 20 Feb 2025 10:26:54 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 0CB6321A9 for ; Thu, 20 Feb 2025 10:26:41 -0500 (EST) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-Hr2biyZJNmaPQXegJYqVvw-1; Thu, 20 Feb 2025 10:26:39 -0500 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 96E4D18D95FE for ; Thu, 20 Feb 2025 15:26:38 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E71C619412A3 for ; Thu, 20 Feb 2025 15:26:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1740065200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kKiZgBQZKuonJIMcLyavItFWbm5zxL2gcC1EehNSmHo=; b=EaorYvzt33bV88NtqPmRkKo8CEieLIftkq9Iy4JpeMlZyLjXV0XEYy3FnWFDfBZzXZ5hqB EJc7OT3D1+Q0F9rPRgFsKzrrmeFYQGKxOVBwvai4gelGkm5le77f2IJulbl9PbtiFdHIO/ oHczAJrwLuAtoscIIHEaSrxE50v/xqM= X-MC-Unique: Hr2biyZJNmaPQXegJYqVvw-1 X-Mimecast-MFC-AGG-ID: Hr2biyZJNmaPQXegJYqVvw_1740065198 From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH 10/13] virsh: Avoid using translated messages without format Date: Thu, 20 Feb 2025 16:26:12 +0100 Message-ID: <396931877b231d70441dda167c9ba6c1b7c56cef.1740064957.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: tvposPT_ObeTNMywFhuCjJ5Qm9UaTvFyoUmf-rcTACI_1740065198 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 7Z7GTPI2VTLFWXYHKW6QVHR6ACQWYIIZ X-Message-ID-Hash: 7Z7GTPI2VTLFWXYHKW6QVHR6ACQWYIIZ X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1740065523336019000 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- tools/virsh-domain-monitor.c | 8 ++-- tools/virsh-domain.c | 72 ++++++++++++++++++------------------ tools/virsh-host.c | 2 +- tools/virsh-secret.c | 4 +- tools/virsh-snapshot.c | 2 +- tools/virsh-util.c | 8 ++-- tools/virsh-volume.c | 4 +- tools/virsh.c | 2 +- tools/virt-admin.c | 10 ++--- 9 files changed, 56 insertions(+), 56 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 150e6ec806..fa1c05ac77 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -783,7 +783,7 @@ cmdDomIfGetLink(vshControl *ctl, const vshCmd *cmd) iface); =20 if ((ninterfaces =3D virXPathNodeSet(xpath, ctxt, &interfaces)) < 0) { - vshError(ctl, _("Failed to extract interface information")); + vshError(ctl, "%s", _("Failed to extract interface information")); return false; } =20 @@ -795,7 +795,7 @@ cmdDomIfGetLink(vshControl *ctl, const vshCmd *cmd) =20 return false; } else if (ninterfaces > 1) { - vshError(ctl, _("multiple matching interfaces found")); + vshError(ctl, "%s", _("multiple matching interfaces found")); return false; } =20 @@ -1386,7 +1386,7 @@ cmdDomTime(vshControl *ctl, const vshCmd *cmd) =20 if (doSet || now || rtcSync) { if (now && ((seconds =3D time(NULL)) =3D=3D (time_t) -1)) { - vshError(ctl, _("Unable to get current time")); + vshError(ctl, "%s", _("Unable to get current time")); return false; } =20 @@ -2288,7 +2288,7 @@ cmdDomIfAddr(vshControl *ctl, const vshCmd *cmd) return false; =20 if ((ifaces_count =3D virDomainInterfaceAddresses(dom, &ifaces, source= , 0)) < 0) { - vshError(ctl, _("Failed to query for interfaces addresses")); + vshError(ctl, "%s", _("Failed to query for interfaces addresses")); goto cleanup; } =20 diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index e20888f2c2..2db88a1a7d 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -540,7 +540,7 @@ cmdAttachDiskFormatAddress(vshControl *ctl, struct virshAddress diskAddr; =20 if (virshAddressParse(straddr, multifunction, &diskAddr) < 0) { - vshError(ctl, _("Invalid address.")); + vshError(ctl, "%s", _("Invalid address.")); return -1; } =20 @@ -689,7 +689,7 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd) } =20 if ((type =3D=3D VIRSH_ATTACH_DISK_SOURCE_TYPE_NETWORK) !=3D !!source_= protocol) { - vshError(ctl, _("--source-protocol option requires --sourcetype ne= twork")); + vshError(ctl, "%s", _("--source-protocol option requires --sourcet= ype network")); return false; } =20 @@ -992,7 +992,7 @@ cmdAttachInterface(vshControl *ctl, const vshCmd *cmd) if (virshParseRateStr(ctl, inboundStr, &inbound) < 0) return false; if (!inbound.average && !inbound.floor) { - vshError(ctl, _("either inbound average or floor is mandatory"= )); + vshError(ctl, "%s", _("either inbound average or floor is mand= atory")); return false; } } @@ -1000,11 +1000,11 @@ cmdAttachInterface(vshControl *ctl, const vshCmd *c= md) if (virshParseRateStr(ctl, outboundStr, &outbound) < 0) return false; if (outbound.average =3D=3D 0) { - vshError(ctl, _("outbound average is mandatory")); + vshError(ctl, "%s", _("outbound average is mandatory")); return false; } if (outbound.floor) { - vshError(ctl, _("outbound floor is unsupported yet")); + vshError(ctl, "%s", _("outbound floor is unsupported yet")); return false; } } @@ -1048,7 +1048,7 @@ cmdAttachInterface(vshControl *ctl, const vshCmd *cmd) =20 case VIR_DOMAIN_NET_TYPE_VHOSTUSER: if (sourceMode < 0) { - vshError(ctl, _("source-mode is mandatory")); + vshError(ctl, "%s", _("source-mode is mandatory")); return false; } virBufferAsprintf(&buf, "\n", @@ -3144,7 +3144,7 @@ cmdDomIfSetLink(vshControl *ctl, const vshCmd *cmd) return false; =20 if ((nnodes =3D virXPathNodeSet("/domain/devices/interface", ctxt, &no= des)) <=3D 0) { - vshError(ctl, _("Failed to extract interface information or no int= erfaces found")); + vshError(ctl, "%s", _("Failed to extract interface information or = no interfaces found")); return false; } =20 @@ -3177,7 +3177,7 @@ cmdDomIfSetLink(vshControl *ctl, const vshCmd *cmd) /* try to find element or create new one */ if (!(linkNode =3D virXPathNode("./link", ctxt))) { if (!(linkNode =3D xmlNewChild(ifaceNode, NULL, BAD_CAST "link", N= ULL))) { - vshError(ctl, _("failed to create XML node")); + vshError(ctl, "%s", _("failed to create XML node")); return false; } } @@ -3188,13 +3188,13 @@ cmdDomIfSetLink(vshControl *ctl, const vshCmd *cmd) stateAttr =3D xmlNewProp(linkNode, BAD_CAST "state", BAD_CAST stat= e); =20 if (!stateAttr) { - vshError(ctl, _("Failed to create or modify the state XML attribut= e")); + vshError(ctl, "%s", _("Failed to create or modify the state XML at= tribute")); return false; } =20 if (!(xml_buf =3D virXMLNodeToString(xml, ifaceNode))) { vshSaveLibvirtError(); - vshError(ctl, _("Failed to create XML")); + vshError(ctl, "%s", _("Failed to create XML")); return false; } =20 @@ -3204,7 +3204,7 @@ cmdDomIfSetLink(vshControl *ctl, const vshCmd *cmd) } =20 if (virDomainUpdateDeviceFlags(dom, xml_buf, flags) < 0) { - vshError(ctl, _("Failed to update interface link state")); + vshError(ctl, "%s", _("Failed to update interface link state")); return false; } =20 @@ -3297,7 +3297,7 @@ cmdDomIftune(vshControl *ctl, const vshCmd *cmd) =20 if ((!inbound.average && (inbound.burst || inbound.peak)) && !inbound.floor) { - vshError(ctl, _("either inbound average or floor is mandatory"= )); + vshError(ctl, "%s", _("either inbound average or floor is mand= atory")); goto cleanup; } =20 @@ -3335,12 +3335,12 @@ cmdDomIftune(vshControl *ctl, const vshCmd *cmd) goto cleanup; } if (outbound.average =3D=3D 0 && (outbound.burst || outbound.peak)= ) { - vshError(ctl, _("outbound average is mandatory")); + vshError(ctl, "%s", _("outbound average is mandatory")); goto cleanup; } =20 if (outbound.floor) { - vshError(ctl, _("outbound floor is unsupported yet")); + vshError(ctl, "%s", _("outbound floor is unsupported yet")); goto cleanup; } =20 @@ -3659,7 +3659,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) ignore_value(vshCommandOptStringQuiet(ctl, cmd, "storage", &vol_string= )); =20 if (!(vol_string || remove_all_storage) && wipe_storage) { - vshError(ctl, + vshError(ctl, "%s", _("'--wipe-storage' requires '--storage ' or '--r= emove-all-storage'")); return false; } @@ -3744,13 +3744,13 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) /* Stash domain description for later use */ if (vol_string || remove_all_storage) { if (running) { - vshError(ctl, + vshError(ctl, "%s", _("Storage volume deletion is supported only on stopp= ed domains")); goto cleanup; } =20 if (vol_string && remove_all_storage) { - vshError(ctl, + vshError(ctl, "%s", _("Specified both --storage and --remove-all-storage"= )); goto cleanup; } @@ -3923,7 +3923,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) vols[i].target, vols[i].source); fflush(stdout); if (virStorageVolWipe(vols[i].vol, 0) < 0) { - vshError(ctl, _("Failed! Volume not removed.")); + vshError(ctl, "%s", _("Failed! Volume not removed.")); ret =3D false; continue; } else { @@ -7206,7 +7206,7 @@ cmdSetvcpus(vshControl *ctl, const vshCmd *cmd) return false; =20 if (count =3D=3D 0) { - vshError(ctl, _("Can't set 0 processors for a VM")); + vshError(ctl, "%s", _("Can't set 0 processors for a VM")); return false; } =20 @@ -7272,7 +7272,7 @@ cmdGuestvcpus(vshControl *ctl, const vshCmd *cmd) return false; =20 if (cpulist && !(enable || disable)) { - vshError(ctl, _("One of options --enable or --disable is required = by option --cpulist")); + vshError(ctl, "%s", _("One of options --enable or --disable is req= uired by option --cpulist")); return false; } =20 @@ -7470,7 +7470,7 @@ cmdIOThreadInfo(vshControl *ctl, const vshCmd *cmd) return false; =20 if ((rc =3D virDomainGetIOThreadInfo(dom, &info, flags)) < 0) { - vshError(ctl, _("Unable to get domain IOThreads information")); + vshError(ctl, "%s", _("Unable to get domain IOThreads information"= )); goto cleanup; } niothreads =3D rc; @@ -7751,7 +7751,7 @@ cmdIOThreadSet(vshControl *ctl, const vshCmd *cmd) return false; =20 if (npar =3D=3D 0) { - vshError(ctl, _("Not enough arguments passed, nothing to set")); + vshError(ctl, "%s", _("Not enough arguments passed, nothing to set= ")); return false; } =20 @@ -8593,7 +8593,7 @@ cmdSendKey(vshControl *ctl, const vshCmd *cmd) =20 for (opt =3D vshCommandOptArgv(cmd, "keycode"); opt && *opt; opt++) { if (count =3D=3D VIR_DOMAIN_SEND_KEY_MAX_KEYS) { - vshError(ctl, _("too many keycodes")); + vshError(ctl, "%s", _("too many keycodes")); return false; } =20 @@ -8922,10 +8922,10 @@ virshGetUpdatedMemoryXML(char **updatedMemoryXML, vshSaveLibvirtError(); return -1; } else if (nmems =3D=3D 0) { - vshError(ctl, _("no memory device found")); + vshError(ctl, "%s", _("no memory device found")); return -1; } else if (nmems > 1) { - vshError(ctl, _("multiple memory devices found, use --alias or --n= ode to select one")); + vshError(ctl, "%s", _("multiple memory devices found, use --alias = or --node to select one")); return -1; } =20 @@ -8944,7 +8944,7 @@ virshGetUpdatedMemoryXML(char **updatedMemoryXML, requestedSizeNode =3D virXPathNode("./target/requested", ctxt); =20 if (!requestedSizeNode) { - vshError(ctl, _("virtio-mem device is missing ")); + vshError(ctl, "%s", _("virtio-mem device is missing ")); return -1; } =20 @@ -11730,7 +11730,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd) return false; =20 if (!virDomainIsActive(dom)) { - vshError(ctl, _("Domain is not running")); + vshError(ctl, "%s", _("Domain is not running")); return false; } =20 @@ -11767,7 +11767,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd) if (type) vshError(ctl, _("No graphical display with type '%1$s' found")= , type); else - vshError(ctl, _("No graphical display found")); + vshError(ctl, "%s", _("No graphical display found")); } =20 return ret; @@ -11800,7 +11800,7 @@ cmdVNCDisplay(vshControl *ctl, const vshCmd *cmd) =20 /* Check if the domain is active and don't rely on -1 for this */ if (!virDomainIsActive(dom)) { - vshError(ctl, _("Domain is not running")); + vshError(ctl, "%s", _("Domain is not running")); return false; } =20 @@ -11810,7 +11810,7 @@ cmdVNCDisplay(vshControl *ctl, const vshCmd *cmd) /* Get the VNC port */ if (virXPathInt("string(/domain/devices/graphics[@type=3D'vnc']/@port)= ", ctxt, &port)) { - vshError(ctl, _("Failed to get VNC port. Is this domain using VNC?= ")); + vshError(ctl, "%s", _("Failed to get VNC port. Is this domain usin= g VNC?")); return false; } =20 @@ -12454,7 +12454,7 @@ virshUpdateDiskXML(xmlNodePtr disk_node, source_block =3D false; new_source =3D NULL; } else if (!new_source) { - vshError(NULL, _("New disk media source was not specified")); + vshError(NULL, "%s", _("New disk media source was not specified")); return NULL; } =20 @@ -12861,7 +12861,7 @@ cmdDomFSTrim(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virDomainFSTrim(dom, mountPoint, minimum, flags) < 0) { - vshError(ctl, _("Unable to invoke fstrim")); + vshError(ctl, "%s", _("Unable to invoke fstrim")); return false; } =20 @@ -12898,7 +12898,7 @@ cmdDomFSFreeze(vshControl *ctl, const vshCmd *cmd) nmountpoints =3D g_strv_length((GStrv) mountpoints); =20 if ((count =3D virDomainFSFreeze(dom, mountpoints, nmountpoints, 0)) <= 0) { - vshError(ctl, _("Unable to freeze filesystems")); + vshError(ctl, "%s", _("Unable to freeze filesystems")); return false; } =20 @@ -12936,7 +12936,7 @@ cmdDomFSThaw(vshControl *ctl, const vshCmd *cmd) nmountpoints =3D g_strv_length((GStrv) mountpoints); =20 if ((count =3D virDomainFSThaw(dom, mountpoints, nmountpoints, 0)) < 0= ) { - vshError(ctl, _("Unable to thaw filesystems")); + vshError(ctl, "%s", _("Unable to thaw filesystems")); return false; } =20 @@ -12970,7 +12970,7 @@ cmdDomFSInfo(vshControl *ctl, const vshCmd *cmd) =20 rc =3D virDomainGetFSInfo(dom, &info, 0); if (rc < 0) { - vshError(ctl, _("Unable to get filesystem information")); + vshError(ctl, "%s", _("Unable to get filesystem information")); goto cleanup; } ninfos =3D rc; @@ -13252,7 +13252,7 @@ cmdSetUserSSHKeys(vshControl *ctl, const vshCmd *cm= d) flags |=3D VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_APPEND; =20 if (!from) { - vshError(ctl, _("Option --file is required")); + vshError(ctl, "%s", _("Option --file is required")); return false; } } diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 1b992e70f6..9e8f542c96 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -1146,7 +1146,7 @@ vshExtractCPUDefXMLs(vshControl *ctl, xmlNodeSetName(nodes[i], (const xmlChar *)"cpu"); while (nodes[i]->properties) { if (xmlRemoveProp(nodes[i]->properties) < 0) { - vshError(ctl, + vshError(ctl, "%s", _("Cannot extract CPU definition from domain = capabilities XML")); return NULL; } diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c index 3a4160107b..68b14a5276 100644 --- a/tools/virsh-secret.c +++ b/tools/virsh-secret.c @@ -235,7 +235,7 @@ cmdSecretSetValue(vshControl *ctl, const vshCmd *cmd) =20 if (base64) { /* warn users that the --base64 option passed from command line is= wrong */ - vshWarn(ctl, _("Passing secret value as command-line argument is i= nsecure!")); + vshWarn(ctl, "%s", _("Passing secret value as command-line argumen= t is insecure!")); secret_val =3D g_strdup(base64); secret_len =3D strlen(secret_val); } else if (filename) { @@ -257,7 +257,7 @@ cmdSecretSetValue(vshControl *ctl, const vshCmd *cmd) secret_len =3D strlen(secret_val); plain =3D true; } else { - vshError(ctl, _("Input secret value is missing")); + vshError(ctl, "%s", _("Input secret value is missing")); return false; } =20 diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index e0be8e7582..2821cd9e26 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -1140,7 +1140,7 @@ virshSnapshotListCollect(vshControl *ctl, virDomainPt= r dom, =20 if (count < 0) { if (!last_error) - vshError(ctl, _("failed to collect snapshot list")); + vshError(ctl, "%s", _("failed to collect snapshot list")); goto cleanup; } =20 diff --git a/tools/virsh-util.c b/tools/virsh-util.c index 55ab71f26a..a4ae5be08c 100644 --- a/tools/virsh-util.c +++ b/tools/virsh-util.c @@ -383,14 +383,14 @@ virshDomainGetXMLFromDom(vshControl *ctl, g_autofree char *desc =3D NULL; =20 if (!(desc =3D virDomainGetXMLDesc(dom, flags))) { - vshError(ctl, _("Failed to get domain description xml")); + vshError(ctl, "%s", _("Failed to get domain description xml")); return -1; } =20 *xml =3D virXMLParseStringCtxt(desc, _("(domain_definition)"), ctxt); =20 if (!(*xml)) { - vshError(ctl, _("Failed to parse domain description xml")); + vshError(ctl, "%s", _("Failed to parse domain description xml")); return -1; } =20 @@ -408,14 +408,14 @@ virshNetworkGetXMLFromNet(vshControl *ctl, g_autofree char *desc =3D NULL; =20 if (!(desc =3D virNetworkGetXMLDesc(net, flags))) { - vshError(ctl, _("Failed to get network description xml")); + vshError(ctl, "%s", _("Failed to get network description xml")); return -1; } =20 *xml =3D virXMLParseStringCtxt(desc, _("(network_definition)"), ctxt); =20 if (!(*xml)) { - vshError(ctl, _("Failed to parse network description xml")); + vshError(ctl, "%s", _("Failed to parse network description xml")); return -1; } =20 diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 430961fef2..7b1847d7ae 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -676,7 +676,7 @@ cmdVolUpload(vshControl *ctl, const vshCmd *cmd) flags |=3D VIR_STORAGE_VOL_UPLOAD_SPARSE_STREAM; =20 if (!(st =3D virStreamNew(priv->conn, 0))) { - vshError(ctl, _("cannot create a new stream")); + vshError(ctl, "%s", _("cannot create a new stream")); return false; } =20 @@ -793,7 +793,7 @@ cmdVolDownload(vshControl *ctl, const vshCmd *cmd) cbData.isBlock =3D !!S_ISBLK(sb.st_mode); =20 if (!(st =3D virStreamNew(priv->conn, 0))) { - vshError(ctl, _("cannot create a new stream")); + vshError(ctl, "%s", _("cannot create a new stream")); goto cleanup; } =20 diff --git a/tools/virsh.c b/tools/virsh.c index 090fdb2017..800e280c7a 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -757,7 +757,7 @@ virshParseArgv(vshControl *ctl, int argc, char **argv) vshError(ctl, _("unsupported option '%1$s'. See --help."),= argv[optind - 1]); exit(EXIT_FAILURE); default: - vshError(ctl, _("unknown option")); + vshError(ctl, "%s", _("unknown option")); exit(EXIT_FAILURE); } longindex =3D -1; diff --git a/tools/virt-admin.c b/tools/virt-admin.c index fe2868d379..2d63098444 100644 --- a/tools/virt-admin.c +++ b/tools/virt-admin.c @@ -975,14 +975,14 @@ cmdDaemonLogFilters(vshControl *ctl, const vshCmd *cm= d) const char *filters =3D NULL; if ((vshCommandOptString(ctl, cmd, "filters", &filters) < 0 || virAdmConnectSetLoggingFilters(priv->conn, filters, 0) < 0)) { - vshError(ctl, _("Unable to change daemon logging settings")); + vshError(ctl, "%s", _("Unable to change daemon logging setting= s")); return false; } } else { g_autofree char *filters =3D NULL; if (virAdmConnectGetLoggingFilters(priv->conn, &filters, 0) < 0) { - vshError(ctl, _("Unable to get daemon logging filters informat= ion")); + vshError(ctl, "%s", _("Unable to get daemon logging filters in= formation")); return false; } =20 @@ -1024,13 +1024,13 @@ cmdDaemonLogOutputs(vshControl *ctl, const vshCmd *= cmd) const char *outputs =3D NULL; if ((vshCommandOptString(ctl, cmd, "outputs", &outputs) < 0 || virAdmConnectSetLoggingOutputs(priv->conn, outputs, 0) < 0)) { - vshError(ctl, _("Unable to change daemon logging settings")); + vshError(ctl, "%s", _("Unable to change daemon logging setting= s")); return false; } } else { g_autofree char *outputs =3D NULL; if (virAdmConnectGetLoggingOutputs(priv->conn, &outputs, 0) < 0) { - vshError(ctl, _("Unable to get daemon logging outputs informat= ion")); + vshError(ctl, "%s", _("Unable to get daemon logging outputs in= formation")); return false; } =20 @@ -1320,7 +1320,7 @@ vshAdmParseArgv(vshControl *ctl, int argc, char **arg= v) vshError(ctl, _("unsupported option '%1$s'. See --help."),= argv[optind - 1]); exit(EXIT_FAILURE); default: - vshError(ctl, _("unknown option")); + vshError(ctl, "%s", _("unknown option")); exit(EXIT_FAILURE); } longindex =3D -1; --=20 2.48.1