mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tools: report messages for 'dominfo' command
$ 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'
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -1291,6 +1291,7 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
|
||||
char *str, uuid[VIR_UUID_STRING_BUFLEN];
|
||||
int has_managed_save = 0;
|
||||
virshControlPtr priv = ctl->privData;
|
||||
g_auto(GStrv) messages = NULL;
|
||||
|
||||
if (!(dom = 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 = 0; messages[i] != NULL; i++) {
|
||||
vshPrint(ctl, "%-15s %s\n",
|
||||
i == 0 ? _("Messages:") : "", messages[i]);
|
||||
}
|
||||
}
|
||||
|
||||
virshDomainFree(dom);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user