From nobody Fri May 3 15:52:54 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=1635324789; cv=none; d=zohomail.com; s=zohoarc; b=gMdrc3Z/nr+iSyDH733NxMd2w6wyqguSkLxCszXDnpbEM2kIuJt38fA/5HClDjX5nkR/QWmDdhevgiUxZOul37YQbmfICZ/rJOsziYx6nbJerKQx9GIzJ4U4Xdpr5YX4uw21n6HQeWSogvMTkh6Zzvl53Iwhy7BIywfALNkWJfI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635324789; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=RItk4wDfeiVhQOfij0iwwosyi7tbypbZZok0qTa47Qc=; b=bL5rMsh43JvPDkMHEsAqGyjYERnsSCrvGr7DtJYrnEr+FISdas4k47iImQTkg+xmmsbAqh3zyoLJsN0sYTnNP8CwppoDCxWqi7yMPuzb7WS9yMQ9pM2ht3SOr6hKWfFzjYGlh64rJw026VkMRb74HBgM94aTBgEO9eroXl7LaZs= 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) 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 1635324789808890.8061918399917; Wed, 27 Oct 2021 01:53:09 -0700 (PDT) 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-403-raniBnY6ObOldsfboyWgBw-1; Wed, 27 Oct 2021 04:53:05 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E21F2806700; Wed, 27 Oct 2021 08:52:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8EA1C794A0; Wed, 27 Oct 2021 08:52:59 +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 60C671800FDD; Wed, 27 Oct 2021 08:52:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19R8quGi025074 for ; Wed, 27 Oct 2021 04:52:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id B72BF69219; Wed, 27 Oct 2021 08:52:56 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-13-105.pek2.redhat.com [10.72.13.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E95E6A241; Wed, 27 Oct 2021 08:52:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635324788; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=RItk4wDfeiVhQOfij0iwwosyi7tbypbZZok0qTa47Qc=; b=Vf1zptwtdYWqr0vRhPQup0AqtohWsc/w0Huld0xPf4Ge8q+MgR8mqPI7UHjixj9acpb3En kp68e5ZtB2hkS3OzaSWn7k1x7Y9AVHZPcGzSu9r19s8GWCtX7AXeXanqYGHKxcf5xb/JLD JCKVuobyRsP+K0ZVJDXB0wuaJbf5Jmc= X-MC-Unique: raniBnY6ObOldsfboyWgBw-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH] virsh: Fix ambiguous output in metadata-change event Date: Wed, 27 Oct 2021 16:52:33 +0800 Message-Id: <20211027085233.193677-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Han Han 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.16 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) X-ZM-MESSAGEID: 1635324791777100001 Content-Type: text/plain; charset="utf-8" When you set metadata with type element like the following: dom.setMetadata(libvirt.VIR_DOMAIN_METADATA_ELEMENT, "", 'abc', "HAH= AH", 0) Then for `virsh event --all`, then it will output this message: event 'metadata-change' for domain 'rhel9': element HAHAH The message is ambiguous since it looks like the params for metadata-change event is the element HAHAH. Actually that means the type is element while the url is HAHAH. Let's make it more clear. Signed-off-by: Han Han Reviewed-by: Michal Privoznik --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 7f3356a536..d454075dfc 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -13317,7 +13317,7 @@ virshEventMetadataChangePrint(virConnectPtr conn G_= GNUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'metadata-change' for domain '%s': %s= %s\n"), + virBufferAsprintf(&buf, _("event 'metadata-change' for domain '%s': ty= pe %s, uri %s\n"), virDomainGetName(dom), UNKNOWNSTR(virshEventMetadataChangeTypeTypeToString(= type)), NULLSTR(nsuri)); --=20 2.33.1