[PATCH] virsh: tell if domain is updated in dominfo

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

 



* tools/virsh.c (introduce new information 'Updated' for 'dominfo',
standsfor if a domain is updated via operations like 'update-device',
'update-disk', etc.)
---
 tools/virsh.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index ae88cc0..d260443 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -1992,6 +1992,7 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
     virSecurityModel secmodel;
     virSecurityLabel seclabel;
     int persistent = 0;
+    int updated = -1;
     int ret = TRUE, autostart;
     unsigned int id;
     char *str, uuid[VIR_UUID_STRING_BUFLEN];
@@ -2053,6 +2054,12 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
     else
         vshPrint(ctl, "%-15s %s\n", _("Persistent:"), persistent ? _("yes") : _("no"));

+    updated = virDomainIsUpdated(dom);
+    if (updated < 0)
+        vshPrint(ctl, "%-15s %s\n", _("Updated:"), _("unknown"));
+    else
+        vshPrint(ctl, "%-15s %s\n", _("Updated:"), updated ? _("yes") : _("no"));
+
     /* Check and display whether the domain autostarts or not */
     if (!virDomainGetAutostart(dom, &autostart)) {
         vshPrint(ctl, "%-15s %s\n", _("Autostart:"),
--
1.7.3.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[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]