[libvirt PATCH 16/16] tools: report tainting for 'dominfo' command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$ 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)
Tainting:       custom-monitor
                deprecated-config
Deprecations:   machine type 'pc-1.3'
                CPU model 'Icelake-Client'

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 tools/virsh-domain-monitor.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 6b39b60339..ca85851810 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1292,6 +1292,7 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
     int has_managed_save = 0;
     virshControlPtr priv = ctl->privData;
     char **deprecations = NULL;
+    char **tainting = NULL;
 
     if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
         return false;
@@ -1393,6 +1394,17 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
         }
     }
 
+    if (virDomainGetTainting(dom, &tainting, 0) > 0) {
+        size_t i;
+        for (i = 0; tainting[i] != NULL; i++) {
+            if (i == 0) {
+                vshPrint(ctl, "%-15s %s\n", _("Tainting:"), tainting[i]);
+            } else {
+                vshPrint(ctl, "%-15s %s\n", "", tainting[i]);
+            }
+        }
+    }
+
     if (virDomainGetDeprecations(dom, &deprecations, 0) > 0) {
         size_t i;
         for (i = 0; deprecations[i] != NULL; i++) {
-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux