]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Display autostart status in virsh dominfo command.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 27 May 2008 09:41:25 +0000 (09:41 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 27 May 2008 09:41:25 +0000 (09:41 +0000)
* src/virsh.c: Display autostart status in virsh dominfo
command (Shigeki Sakamoto).

ChangeLog
src/virsh.c

index b871aeee3cf18fe498a9ca3f5a9d20772f92c85a..544fcebe237a2066e354663d321f700165f47094 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue May 27 10:40:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
+
+       Display autostart status in virsh dominfo command.
+       * src/virsh.c: Display autostart status in virsh dominfo
+       command (Shigeki Sakamoto).
+
 Tue May 27 09:54:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
 
        Fix use of header files in disk storage backend.
index 4dd4c5e8b166aeabf8be3ae79433cda252d60a9d..c6698e2cf2c1a36bb037c18a4d5596c5bc665fee 100644 (file)
@@ -1492,7 +1492,7 @@ cmdDominfo(vshControl * ctl, vshCmd * cmd)
 {
     virDomainInfo info;
     virDomainPtr dom;
-    int ret = TRUE;
+    int ret = TRUE, autostart;
     unsigned int id;
     char *str, uuid[VIR_UUID_STRING_BUFLEN];
 
@@ -1545,6 +1545,11 @@ cmdDominfo(vshControl * ctl, vshCmd * cmd)
         ret = FALSE;
     }
 
+    if (!virDomainGetAutostart(dom, &autostart)) {
+        vshPrint(ctl, "%-15s %-15s\n", _("Autostart:"),
+                 autostart ? _("enable") : _("disable") );
+    }
+
     virDomainFree(dom);
     return ret;
 }