[libvirt] [PATCH] virsh: tell if domain is updated in dominfo
Daniel P. Berrange
berrange at redhat.com
Thu Nov 18 09:47:41 UTC 2010
On Thu, Nov 18, 2010 at 03:26:57PM +0800, Osier Yang wrote:
> * 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:"),
ACK
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list