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

[libvirt] [RESEND] virsh: tell if running domain conf is updated



Based on "virDomainIsUpdated" API, to tell if the running domain
configuration is updated by "attach/detach/update device" and
"setvcpus" via "dominfo".

* tools/virsh.c
---
 tools/virsh.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 4e37f2d..2960b79 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -2038,6 +2038,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];
@@ -2099,6 +2100,15 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
     else
         vshPrint(ctl, "%-15s %s\n", _("Persistent:"), persistent ? _("yes") : _("no"));

+    /* Check and display whether the domain running configuration is
+     * updated or not.
+     */
+    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


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