From nobody Wed May 15 23:02:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1609849105; cv=none; d=zohomail.com; s=zohoarc; b=ky7vqqsysut7L9GqYodQtcvGyfLhxV24zlmR2s8q7ZadcOSxn2fvfuHSilqQUlwT0pFvTlTSW09jxwXRCyHKhryr1WO3IqrRcXVc2OYibgSAiOvt5wtG51jvIgACx/9RnJTPqZ+IOnJzdAZNFewWEIRaauXQM4RVv9HPHVrITpw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609849105; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=ucQi8C+giojorB1W4gNBA6oDLP8+Q1ma67uhZsbNeNM=; b=aJVbwevsmXjlScEA1efDyAMCvEXu1cg6WvEI08nN3B39w83yeGXCmJFJstEw3ftzBei4q0AzZ7PClzI5Vx+xQEx98UG7J9O4i1TMl6LSNBm4EO03j+ey/FzpWcVtXpmVO4Oiwcz7LDrn6GPfQAYsu9GFGw7Y+3UFAJmZwjOmsBg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1609849105353122.05539186196131; Tue, 5 Jan 2021 04:18:25 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-345-_n_VmEFiMr607sQo5wvxww-1; Tue, 05 Jan 2021 07:18:21 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 39BB1800D62; Tue, 5 Jan 2021 12:18:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F10C5D9CC; Tue, 5 Jan 2021 12:18:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 568D34E58E; Tue, 5 Jan 2021 12:18:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 105CIBiZ029117 for ; Tue, 5 Jan 2021 07:18:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id B591B5D9CC; Tue, 5 Jan 2021 12:18:11 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id A1A635D9C6 for ; Tue, 5 Jan 2021 12:18:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609849104; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ucQi8C+giojorB1W4gNBA6oDLP8+Q1ma67uhZsbNeNM=; b=XSpjo6lBXdF1JWFOW8dJ6rjN53b2Lr8abeGwbtpmCCjBkEbH14ZCP393yvIUY8LuBc/DnK OlsRREW9gNGXro+hN7CI8Zkb8FD7WMWfsBDF5SUIm5awPKk8eCj6DO594HWR9+XeFDiItI y9bLT6hK2pBu+U8AZ09Benfn+tlsygw= X-MC-Unique: _n_VmEFiMr607sQo5wvxww-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] virsh-domain: Add quotes around '%s' formatting domain name Date: Tue, 5 Jan 2021 13:18:06 +0100 Message-Id: <5d1a9e6a289984d515eb74dc3cf3084ee4b03bee.1609849086.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Domain name can contain spaces in which case it's not immediately clear from virsh messages where the boundary of the name is. Enclose all %s formatters in apostrophes as delimiters. Done via the following vim regex: %s/omain %s/omain '%s'/g This patch changes: $ virsh undefine --snapshots-metadata 'OWASP Broken Web Apps VM v1.2' Domain OWASP Broken Web Apps VM v1.2 has been undefined to: $ virsh undefine --snapshots-metadata 'OWASP Broken Web Apps VM v1.2' Domain 'OWASP Broken Web Apps VM v1.2' has been undefined Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- tests/virsh-define-dev-segfault | 2 +- tests/virsh-read-bufsiz | 2 +- tests/virsh-undefine | 8 +- tools/virsh-domain.c | 136 ++++++++++++++++---------------- 4 files changed, 74 insertions(+), 74 deletions(-) diff --git a/tests/virsh-define-dev-segfault b/tests/virsh-define-dev-segfa= ult index a7533ba9b0..cc5b461932 100755 --- a/tests/virsh-define-dev-segfault +++ b/tests/virsh-define-dev-segfault @@ -65,7 +65,7 @@ url=3Dtest:///default $abs_top_builddir/tools/virsh --connect "$url" 'define D.xml; dumpxml D' >= out 2>&1 || fail=3D1 cat > exp < $in || fail=3D1 $abs_top_builddir/tools/virsh --connect test:///default define $in > out= || fail=3D1 - printf "Domain newtest defined from $in\n\n" > exp || fail=3D1 + printf "Domain 'newtest' defined from $in\n\n" > exp || fail=3D1 compare exp out || fail=3D1 done diff --git a/tests/virsh-undefine b/tests/virsh-undefine index 998d4d3268..dbbb367391 100755 --- a/tests/virsh-undefine +++ b/tests/virsh-undefine @@ -37,7 +37,7 @@ sed '/^Persistent/n; /:/d' < out1 > out cat <<\EOF > exp || fail=3D1 Persistent: yes -Domain test has been undefined +Domain 'test' has been undefined Persistent: no @@ -52,7 +52,7 @@ sed '/^Persistent/n; /:/d' < out1 > out cat <<\EOF > exp || fail=3D1 Persistent: yes -Domain 1 has been undefined +Domain '1' has been undefined Persistent: no @@ -64,9 +64,9 @@ $abs_top_builddir/tools/virsh -c test:///default \ 'shutdown test; undefine test; dominfo test' > out 2>&1 test $? =3D 1 || fail=3D1 cat <<\EOF > expout || fail=3D1 -Domain test is being shutdown +Domain 'test' is being shutdown -Domain test has been undefined +Domain 'test' has been undefined error: failed to get domain 'test' diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 1ef9b8d606..2bb136333f 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -1117,17 +1117,17 @@ cmdAutostart(vshControl *ctl, const vshCmd *cmd) if (virDomainSetAutostart(dom, autostart) < 0) { if (autostart) - vshError(ctl, _("Failed to mark domain %s as autostarted"), na= me); + vshError(ctl, _("Failed to mark domain '%s' as autostarted"), = name); else - vshError(ctl, _("Failed to unmark domain %s as autostarted"), = name); + vshError(ctl, _("Failed to unmark domain '%s' as autostarted")= , name); virshDomainFree(dom); return false; } if (autostart) - vshPrintExtra(ctl, _("Domain %s marked as autostarted\n"), name); + vshPrintExtra(ctl, _("Domain '%s' marked as autostarted\n"), name); else - vshPrintExtra(ctl, _("Domain %s unmarked as autostarted\n"), name); + vshPrintExtra(ctl, _("Domain '%s' unmarked as autostarted\n"), nam= e); virshDomainFree(dom); return true; @@ -2987,7 +2987,7 @@ cmdRunConsole(vshControl *ctl, virDomainPtr dom, return false; } - vshPrintExtra(ctl, _("Connected to domain %s\n"), virDomainGetName(dom= )); + vshPrintExtra(ctl, _("Connected to domain '%s'\n"), virDomainGetName(d= om)); vshPrintExtra(ctl, _("Escape character is %s"), priv->escapeChar); if (priv->escapeChar[0] =3D=3D '^') vshPrintExtra(ctl, " (Ctrl + %c)", priv->escapeChar[1]); @@ -3427,9 +3427,9 @@ cmdSuspend(vshControl *ctl, const vshCmd *cmd) return false; if (virDomainSuspend(dom) =3D=3D 0) { - vshPrintExtra(ctl, _("Domain %s suspended\n"), name); + vshPrintExtra(ctl, _("Domain '%s' suspended\n"), name); } else { - vshError(ctl, _("Failed to suspend domain %s"), name); + vshError(ctl, _("Failed to suspend domain '%s'"), name); ret =3D false; } @@ -3501,12 +3501,12 @@ cmdDomPMSuspend(vshControl *ctl, const vshCmd *cmd) } if (virDomainPMSuspendForDuration(dom, suspendTarget, duration, 0) < 0= ) { - vshError(ctl, _("Domain %s could not be suspended"), + vshError(ctl, _("Domain '%s' could not be suspended"), virDomainGetName(dom)); goto cleanup; } - vshPrintExtra(ctl, _("Domain %s successfully suspended"), + vshPrintExtra(ctl, _("Domain '%s' successfully suspended"), virDomainGetName(dom)); ret =3D true; @@ -3548,12 +3548,12 @@ cmdDomPMWakeup(vshControl *ctl, const vshCmd *cmd) return false; if (virDomainPMWakeup(dom, flags) < 0) { - vshError(ctl, _("Domain %s could not be woken up"), + vshError(ctl, _("Domain '%s' could not be woken up"), virDomainGetName(dom)); goto cleanup; } - vshPrintExtra(ctl, _("Domain %s successfully woken up"), + vshPrintExtra(ctl, _("Domain '%s' successfully woken up"), virDomainGetName(dom)); ret =3D true; @@ -3930,10 +3930,10 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) out: if (rc =3D=3D 0) { - vshPrintExtra(ctl, _("Domain %s has been undefined\n"), name); + vshPrintExtra(ctl, _("Domain '%s' has been undefined\n"), name); ret =3D true; } else { - vshError(ctl, _("Failed to undefine domain %s"), name); + vshError(ctl, _("Failed to undefine domain '%s'"), name); goto cleanup; } @@ -4150,12 +4150,12 @@ cmdStart(vshControl *ctl, const vshCmd *cmd) if ((nfds ? virDomainCreateWithFiles(dom, nfds, fds, flags) : (flags ? virDomainCreateWithFlags(dom, flags) : virDomainCreate(dom))) < 0) { - vshError(ctl, _("Failed to start domain %s"), virDomainGetName(dom= )); + vshError(ctl, _("Failed to start domain '%s'"), virDomainGetName(d= om)); goto cleanup; } started: - vshPrintExtra(ctl, _("Domain %s started\n"), + vshPrintExtra(ctl, _("Domain '%s' started\n"), virDomainGetName(dom)); #ifndef WIN32 if (console && !cmdRunConsole(ctl, dom, NULL, 0)) @@ -4255,7 +4255,7 @@ doSave(void *opaque) if (((flags || xml) ? virDomainSaveFlags(dom, to, xml, flags) : virDomainSave(dom, to)) < 0) { - vshError(ctl, _("Failed to save domain %s to %s"), name, to); + vshError(ctl, _("Failed to save domain '%s' to %s"), name, to); goto out; } @@ -4512,7 +4512,7 @@ cmdSave(vshControl *ctl, const vshCmd *cmd) virThreadJoin(&workerThread); if (!data.ret) - vshPrintExtra(ctl, _("\nDomain %s saved to %s\n"), name, to); + vshPrintExtra(ctl, _("\nDomain '%s' saved to %s\n"), name, to); cleanup: virshDomainFree(dom); @@ -4771,7 +4771,7 @@ doManagedsave(void *opaque) goto out; if (virDomainManagedSave(dom, flags) < 0) { - vshError(ctl, _("Failed to save domain %s state"), name); + vshError(ctl, _("Failed to save domain '%s' state"), name); goto out; } @@ -4819,7 +4819,7 @@ cmdManagedSave(vshControl *ctl, const vshCmd *cmd) virThreadJoin(&workerThread); if (!data.ret) - vshPrintExtra(ctl, _("\nDomain %s state saved by libvirt\n"), name= ); + vshPrintExtra(ctl, _("\nDomain '%s' state saved by libvirt\n"), na= me); cleanup: virshDomainFree(dom); @@ -4863,15 +4863,15 @@ cmdManagedSaveRemove(vshControl *ctl, const vshCmd = *cmd) if (hassave) { if (virDomainManagedSaveRemove(dom, 0) < 0) { - vshError(ctl, _("Failed to remove managed save image for domai= n %s"), + vshError(ctl, _("Failed to remove managed save image for domai= n '%s'"), name); goto cleanup; } else - vshPrintExtra(ctl, _("Removed managedsave image for domain %s"= ), name); + vshPrintExtra(ctl, _("Removed managedsave image for domain '%s= '"), name); } else - vshPrintExtra(ctl, _("Domain %s has no manage save image; removal = skipped"), + vshPrintExtra(ctl, _("Domain '%s' has no manage save image; remova= l skipped"), name); ret =3D true; @@ -4929,7 +4929,7 @@ cmdManagedSaveEdit(vshControl *ctl, const vshCmd *cmd) #define EDIT_GET_XML virDomainManagedSaveGetXMLDesc(dom, getxml_flags) #define EDIT_NOT_CHANGED \ do { \ - vshPrintExtra(ctl, _("Managed save image of domain %s XML configur= ation " \ + vshPrintExtra(ctl, _("Managed save image of domain '%s' XML config= uration " \ "not changed.\n"), virDomainGetName(dom)); \ ret =3D true; \ goto edit_cleanup; \ @@ -4938,7 +4938,7 @@ cmdManagedSaveEdit(vshControl *ctl, const vshCmd *cmd) (virDomainManagedSaveDefineXML(dom, doc_edited, define_flags) =3D=3D 0) #include "virsh-edit.c" - vshPrintExtra(ctl, _("Managed save image of Domain %s XML configuratio= n edited.\n"), + vshPrintExtra(ctl, _("Managed save image of Domain '%s' XML configurat= ion edited.\n"), virDomainGetName(dom)); ret =3D true; @@ -5057,7 +5057,7 @@ cmdManagedSaveDefine(vshControl *ctl, const vshCmd *c= md) goto cleanup; } - vshPrintExtra(ctl, _("Managed save state file of domain %s updated.\n"= ), + vshPrintExtra(ctl, _("Managed save state file of domain '%s' updated.\= n"), virDomainGetName(dom)); ret =3D true; @@ -5485,12 +5485,12 @@ doDump(void *opaque) if (dumpformat !=3D VIR_DOMAIN_CORE_DUMP_FORMAT_RAW) { if (virDomainCoreDumpWithFormat(dom, to, dumpformat, flags) < 0) { - vshError(ctl, _("Failed to core dump domain %s to %s"), name, = to); + vshError(ctl, _("Failed to core dump domain '%s' to %s"), name= , to); goto out; } } else { if (virDomainCoreDump(dom, to, flags) < 0) { - vshError(ctl, _("Failed to core dump domain %s to %s"), name, = to); + vshError(ctl, _("Failed to core dump domain '%s' to %s"), name= , to); goto out; } } @@ -5543,7 +5543,7 @@ cmdDump(vshControl *ctl, const vshCmd *cmd) virThreadJoin(&workerThread); if (!data.ret) - vshPrintExtra(ctl, _("\nDomain %s dumped to %s\n"), name, to); + vshPrintExtra(ctl, _("\nDomain '%s' dumped to %s\n"), name, to); cleanup: virshDomainFree(dom); @@ -5659,7 +5659,7 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd) cbdata.fd =3D fd; if (virStreamRecvAll(st, virshStreamSink, &cbdata) < 0) { - vshError(ctl, _("could not receive data from domain %s"), name); + vshError(ctl, _("could not receive data from domain '%s'"), name); goto cleanup; } @@ -5669,7 +5669,7 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd) } if (virStreamFinish(st) < 0) { - vshError(ctl, _("cannot close stream on domain %s"), name); + vshError(ctl, _("cannot close stream on domain '%s'"), name); goto cleanup; } @@ -5882,9 +5882,9 @@ cmdResume(vshControl *ctl, const vshCmd *cmd) return false; if (virDomainResume(dom) =3D=3D 0) { - vshPrintExtra(ctl, _("Domain %s resumed\n"), name); + vshPrintExtra(ctl, _("Domain '%s' resumed\n"), name); } else { - vshError(ctl, _("Failed to resume domain %s"), name); + vshError(ctl, _("Failed to resume domain '%s'"), name); ret =3D false; } @@ -5964,9 +5964,9 @@ cmdShutdown(vshControl *ctl, const vshCmd *cmd) else rv =3D virDomainShutdown(dom); if (rv =3D=3D 0) { - vshPrintExtra(ctl, _("Domain %s is being shutdown\n"), name); + vshPrintExtra(ctl, _("Domain '%s' is being shutdown\n"), name); } else { - vshError(ctl, _("Failed to shutdown domain %s"), name); + vshError(ctl, _("Failed to shutdown domain '%s'"), name); goto cleanup; } @@ -6044,9 +6044,9 @@ cmdReboot(vshControl *ctl, const vshCmd *cmd) goto cleanup; if (virDomainReboot(dom, flags) =3D=3D 0) { - vshPrintExtra(ctl, _("Domain %s is being rebooted\n"), name); + vshPrintExtra(ctl, _("Domain '%s' is being rebooted\n"), name); } else { - vshError(ctl, _("Failed to reboot domain %s"), name); + vshError(ctl, _("Failed to reboot domain '%s'"), name); goto cleanup; } @@ -6086,9 +6086,9 @@ cmdReset(vshControl *ctl, const vshCmd *cmd) return false; if (virDomainReset(dom, 0) =3D=3D 0) { - vshPrintExtra(ctl, _("Domain %s was reset\n"), name); + vshPrintExtra(ctl, _("Domain '%s' was reset\n"), name); } else { - vshError(ctl, _("Failed to reset domain %s"), name); + vshError(ctl, _("Failed to reset domain '%s'"), name); ret =3D false; } @@ -8311,7 +8311,7 @@ cmdCreate(vshControl *ctl, const vshCmd *cmd) goto cleanup; } - vshPrintExtra(ctl, _("Domain %s created from %s\n"), + vshPrintExtra(ctl, _("Domain '%s' created from %s\n"), virDomainGetName(dom), from); #ifndef WIN32 if (console) @@ -8374,7 +8374,7 @@ cmdDefine(vshControl *ctl, const vshCmd *cmd) VIR_FREE(buffer); if (dom !=3D NULL) { - vshPrintExtra(ctl, _("Domain %s defined from %s\n"), + vshPrintExtra(ctl, _("Domain '%s' defined from %s\n"), virDomainGetName(dom), from); virshDomainFree(dom); } else { @@ -8427,9 +8427,9 @@ cmdDestroy(vshControl *ctl, const vshCmd *cmd) result =3D virDomainDestroy(dom); if (result =3D=3D 0) { - vshPrintExtra(ctl, _("Domain %s destroyed\n"), name); + vshPrintExtra(ctl, _("Domain '%s' destroyed\n"), name); } else { - vshError(ctl, _("Failed to destroy domain %s"), name); + vshError(ctl, _("Failed to destroy domain '%s'"), name); ret =3D false; } @@ -9724,10 +9724,10 @@ virshEventQemuPrint(virConnectPtr conn G_GNUC_UNUSE= D, if (virTimeStringNowRaw(timestamp) < 0) timestamp[0] =3D '\0'; - vshPrint(data->ctl, "%s: event %s for domain %s: %s\n", + vshPrint(data->ctl, "%s: event %s for domain '%s': %s\n", timestamp, event, virDomainGetName(dom), NULLSTR(details)= ); } else { - vshPrint(data->ctl, "event %s at %lld.%06u for domain %s: %s\n", + vshPrint(data->ctl, "event %s at %lld.%06u for domain '%s': %s\n", event, seconds, micros, virDomainGetName(dom), NULLSTR(de= tails)); } @@ -9886,7 +9886,7 @@ cmdQemuAttach(vshControl *ctl, const vshCmd *cmd) return false; } - vshPrintExtra(ctl, _("Domain %s attached to pid %u\n"), + vshPrintExtra(ctl, _("Domain '%s' attached to pid %u\n"), virDomainGetName(dom), pid_value); virshDomainFree(dom); return true; @@ -12766,7 +12766,7 @@ cmdEdit(vshControl *ctl, const vshCmd *cmd) #define EDIT_GET_XML virDomainGetXMLDesc(dom, query_flags) #define EDIT_NOT_CHANGED \ do { \ - vshPrintExtra(ctl, _("Domain %s XML configuration not changed.\n")= , \ + vshPrintExtra(ctl, _("Domain '%s' XML configuration not changed.\n= "), \ virDomainGetName(dom)); \ ret =3D true; \ goto edit_cleanup; \ @@ -12781,7 +12781,7 @@ cmdEdit(vshControl *ctl, const vshCmd *cmd) #include "virsh-edit.c" #undef EDIT_RELAX - vshPrintExtra(ctl, _("Domain %s XML configuration edited.\n"), + vshPrintExtra(ctl, _("Domain '%s' XML configuration edited.\n"), virDomainGetName(dom_edited)); ret =3D true; @@ -13088,7 +13088,7 @@ virshEventGenericPrint(virConnectPtr conn G_GNUC_UN= USED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event '%s' for domain %s\n"), + virBufferAsprintf(&buf, _("event '%s' for domain '%s'\n"), ((virshDomEventData *) opaque)->cb->name, virDomainGetName(dom)); virshEventPrint(opaque, &buf); @@ -13103,7 +13103,7 @@ virshEventLifecyclePrint(virConnectPtr conn G_GNUC_= UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'lifecycle' for domain %s: %s %s\n"), + virBufferAsprintf(&buf, _("event 'lifecycle' for domain '%s': %s %s\n"= ), virDomainGetName(dom), virshDomainEventToString(event), virshDomainEventDetailToString(event, detail)); @@ -13118,7 +13118,7 @@ virshEventRTCChangePrint(virConnectPtr conn G_GNUC_= UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'rtc-change' for domain %s: %lld\n"), + virBufferAsprintf(&buf, _("event 'rtc-change' for domain '%s': %lld\n"= ), virDomainGetName(dom), utcoffset); virshEventPrint(opaque, &buf); @@ -13132,7 +13132,7 @@ virshEventWatchdogPrint(virConnectPtr conn G_GNUC_U= NUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'watchdog' for domain %s: %s\n"), + virBufferAsprintf(&buf, _("event 'watchdog' for domain '%s': %s\n"), virDomainGetName(dom), virshDomainEventWatchdogToString(action)); virshEventPrint(opaque, &buf); @@ -13148,7 +13148,7 @@ virshEventIOErrorPrint(virConnectPtr conn G_GNUC_UN= USED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'io-error' for domain %s: %s (%s) %s\= n"), + virBufferAsprintf(&buf, _("event 'io-error' for domain '%s': %s (%s) %= s\n"), virDomainGetName(dom), srcPath, devAlias, @@ -13169,7 +13169,7 @@ virshEventGraphicsPrint(virConnectPtr conn G_GNUC_U= NUSED, g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; size_t i; - virBufferAsprintf(&buf, _("event 'graphics' for domain %s: " + virBufferAsprintf(&buf, _("event 'graphics' for domain '%s': " "%s local[%s %s %s] remote[%s %s %s] %s\n"), virDomainGetName(dom), virshGraphicsPhaseToString(phase), @@ -13199,7 +13199,7 @@ virshEventIOErrorReasonPrint(virConnectPtr conn G_G= NUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'io-error-reason' for domain %s: " + virBufferAsprintf(&buf, _("event 'io-error-reason' for domain '%s': " "%s (%s) %s due to %s\n"), virDomainGetName(dom), srcPath, @@ -13219,7 +13219,7 @@ virshEventBlockJobPrint(virConnectPtr conn G_GNUC_U= NUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event '%s' for domain %s: %s for %s %s\n"), + virBufferAsprintf(&buf, _("event '%s' for domain '%s': %s for %s %s\n"= ), ((virshDomEventData *) opaque)->cb->name, virDomainGetName(dom), virshDomainBlockJobToString(type), @@ -13239,7 +13239,7 @@ virshEventDiskChangePrint(virConnectPtr conn G_GNUC= _UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'disk-change' for domain %s disk %s: " + virBufferAsprintf(&buf, _("event 'disk-change' for domain '%s' disk %s= : " "%s -> %s: %s\n"), virDomainGetName(dom), alias, @@ -13258,7 +13258,7 @@ virshEventTrayChangePrint(virConnectPtr conn G_GNUC= _UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'tray-change' for domain %s disk %s: = %s\n"), + virBufferAsprintf(&buf, _("event 'tray-change' for domain '%s' disk %s= : %s\n"), virDomainGetName(dom), alias, virshDomainEventTrayChangeToString(reason)); @@ -13284,7 +13284,7 @@ virshEventBalloonChangePrint(virConnectPtr conn G_G= NUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'balloon-change' for domain %s: %lluK= iB\n"), + virBufferAsprintf(&buf, _("event 'balloon-change' for domain '%s': %ll= uKiB\n"), virDomainGetName(dom), actual); virshEventPrint(opaque, &buf); @@ -13298,7 +13298,7 @@ virshEventDeviceRemovedPrint(virConnectPtr conn G_G= NUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'device-removed' for domain %s: %s\n"= ), + virBufferAsprintf(&buf, _("event 'device-removed' for domain '%s': %s\= n"), virDomainGetName(dom), alias); virshEventPrint(opaque, &buf); @@ -13312,7 +13312,7 @@ virshEventDeviceAddedPrint(virConnectPtr conn G_GNU= C_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'device-added' for domain %s: %s\n"), + virBufferAsprintf(&buf, _("event 'device-added' for domain '%s': %s\n"= ), virDomainGetName(dom), alias); virshEventPrint(opaque, &buf); @@ -13329,7 +13329,7 @@ virshEventTunablePrint(virConnectPtr conn G_GNUC_UN= USED, size_t i; char *value; - virBufferAsprintf(&buf, _("event 'tunable' for domain %s:\n"), + virBufferAsprintf(&buf, _("event 'tunable' for domain '%s':\n"), virDomainGetName(dom)); for (i =3D 0; i < nparams; i++) { value =3D virTypedParameterToString(¶ms[i]); @@ -13365,7 +13365,7 @@ virshEventAgentLifecyclePrint(virConnectPtr conn G_= GNUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'agent-lifecycle' for domain %s: stat= e: " + virBufferAsprintf(&buf, _("event 'agent-lifecycle' for domain '%s': st= ate: " "'%s' reason: '%s'\n"), virDomainGetName(dom), UNKNOWNSTR(virshEventAgentLifecycleStateTypeToString= (state)), @@ -13381,7 +13381,7 @@ virshEventMigrationIterationPrint(virConnectPtr con= n G_GNUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'migration-iteration' for domain %s: " + virBufferAsprintf(&buf, _("event 'migration-iteration' for domain '%s'= : " "iteration: '%d'\n"), virDomainGetName(dom), iteration); @@ -13400,7 +13400,7 @@ virshEventJobCompletedPrint(virConnectPtr conn G_GN= UC_UNUSED, size_t i; char *value; - virBufferAsprintf(&buf, _("event 'job-completed' for domain %s:\n"), + virBufferAsprintf(&buf, _("event 'job-completed' for domain '%s':\n"), virDomainGetName(dom)); for (i =3D 0; i < nparams; i++) { value =3D virTypedParameterToString(¶ms[i]); @@ -13421,7 +13421,7 @@ virshEventDeviceRemovalFailedPrint(virConnectPtr co= nn G_GNUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'device-removal-failed' for domain %s= : %s\n"), + virBufferAsprintf(&buf, _("event 'device-removal-failed' for domain '%= s': %s\n"), virDomainGetName(dom), alias); virshEventPrint(opaque, &buf); @@ -13443,7 +13443,7 @@ virshEventMetadataChangePrint(virConnectPtr conn G_= GNUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'metadata-change' for domain %s: %s %= s\n"), + virBufferAsprintf(&buf, _("event 'metadata-change' for domain '%s': %s= %s\n"), virDomainGetName(dom), UNKNOWNSTR(virshEventMetadataChangeTypeTypeToString(= type)), NULLSTR(nsuri)); @@ -13462,7 +13462,7 @@ virshEventBlockThresholdPrint(virConnectPtr conn G_= GNUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'block-threshold' for domain %s: " + virBufferAsprintf(&buf, _("event 'block-threshold' for domain '%s': " "dev: %s(%s) %llu %llu\n"), virDomainGetName(dom), dev, NULLSTR(path), threshold, excess); @@ -13494,7 +13494,7 @@ virshEventMemoryFailurePrint(virConnectPtr conn G_G= NUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - virBufferAsprintf(&buf, _("event 'memory-failure' for domain %s:\n" + virBufferAsprintf(&buf, _("event 'memory-failure' for domain '%s':\n" "recipient: %s\naction: %s\n"), virDomainGetName(dom), UNKNOWNSTR(virshEventMemoryFailureRecipientTypeTypeT= oString(recipient)), --=20 2.29.2