From nobody Sat Feb 7 12:34:53 2026 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=1612886506; cv=none; d=zohomail.com; s=zohoarc; b=PIZbz+kzjehgxjK2dP+yxB8Mk8Y/5O9gZNT5b2gCuAyNLNjAVw+rm2o2MF1U8y9n93gOPzIBvN9kPdC+p7MIWx1MwR9s8CPf86hPvpkYlWaeWNRURfjudlmjtf/xQpFkgPJxGzxHnzN++oXNHNiESVtgu9yfBQmJ+opT4RgQOio= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612886506; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eRtzdM/Pv0+ZQndGyRNV/ICnKcKtk727IvJXNQamaZM=; b=fVFyqAKDXt1CXm4Am6ZeIcaB2Wnsgh2Z+DeQfmWfpvUKabopEZ0fh/QWf3s4H5rJn9aVjfmVtcL85CqWYJvVUlZBrJC5GdBltn3GhuvoYDObINyoh3yINKS23KgEk9PHghuKwwpSbdlO1BKu4Ku9IPDdN+H67S5aXUSCiX+tSjw= 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 1612886505685908.1827349958504; Tue, 9 Feb 2021 08:01:45 -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-405-uQHMVrQ9OvSIYBM3ytxawA-1; Tue, 09 Feb 2021 11:01:40 -0500 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 E63E0107ACF4; Tue, 9 Feb 2021 16:01:29 +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 C3CAF177C0; Tue, 9 Feb 2021 16:01:29 +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 898131809C8F; Tue, 9 Feb 2021 16:01:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 119G1MHM010817 for ; Tue, 9 Feb 2021 11:01:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3178B60CD2; Tue, 9 Feb 2021 16:01:22 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-66.ams2.redhat.com [10.36.115.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4078F60861; Tue, 9 Feb 2021 16:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612886503; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eRtzdM/Pv0+ZQndGyRNV/ICnKcKtk727IvJXNQamaZM=; b=GlljXPbpYTcObHWmCtC1mA226gATdzsESRd0HG7owFmZkVoz8tPCoo5xVQglsw91wnm7qn JEimLJLVMbnmnNhLdpn5J47/G0rEUx9gXIySWbfKI363inHUDojSTr5WCfMvmiFS8lM5CD VF9jOXglvTMA55FKnBszjtHcy70gS1w= X-MC-Unique: uQHMVrQ9OvSIYBM3ytxawA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH v2 6/6] tools: report messages for 'dominfo' command Date: Tue, 9 Feb 2021 16:01:09 +0000 Message-Id: <20210209160109.1229387-7-berrange@redhat.com> In-Reply-To: <20210209160109.1229387-1-berrange@redhat.com> References: <20210209160109.1229387-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) $ virsh dominfo demo Id: 2 Name: demo UUID: eadf8ef0-bf14-4c5f-9708-4a19bacf9e81 OS Type: hvm State: running CPU(s): 2 CPU time: 15.8s Max memory: 1536000 KiB Used memory: 1536000 KiB Persistent: yes Autostart: disable Managed save: no Security model: selinux Security DOI: 0 Security label: unconfined_u:unconfined_r:svirt_t:s0:c443,c956 (permissive) Messages: tainted: custom monitor control commands issued tainted: use of deprecated configuration settings deprecated configuration: machine type 'pc-1.2' Signed-off-by: Daniel P. Berrang=C3=A9 --- tools/virsh-domain-monitor.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 02ff1fbd62..897339b6f9 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -1291,6 +1291,7 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd) char *str, uuid[VIR_UUID_STRING_BUFLEN]; int has_managed_save =3D 0; virshControlPtr priv =3D ctl->privData; + g_auto(GStrv) messages =3D NULL; =20 if (!(dom =3D virshCommandOptDomain(ctl, cmd, NULL))) return false; @@ -1391,6 +1392,15 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd) VIR_FREE(seclabel); } } + + if (virDomainGetMessages(dom, &messages, 0) > 0) { + size_t i; + for (i =3D 0; messages[i] !=3D NULL; i++) { + vshPrint(ctl, "%-15s %s\n", + i =3D=3D 0 ? _("Messages:") : "", messages[i]); + } + } + virshDomainFree(dom); return ret; } --=20 2.29.2