[libvirt] [PATCH] Plumb domain description tag in xend backend

Daniel Veillard veillard at redhat.com
Wed Dec 9 14:27:01 UTC 2009


On Tue, Dec 08, 2009 at 12:13:06PM -0700, Jim Fehlig wrote:
> I sent this patch yesterday evening using git send-email on a test
> machine which did not have my .gitconfig, so the headers seem quite
> jacked.  Resending ...
> 
> /me still learning git :-/
> 
> Regards,
> Jim
> 

> >From acba9b620128c4dcdbb95a1ea06604f3013a0518 Mon Sep 17 00:00:00 2001
> From: Jim Fehlig <jfehlig at novell.com>
> Date: Mon, 7 Dec 2009 14:24:21 -0700
> Subject: [PATCH] Plumb domain description tag in xend backend
> 
> xen-unstable changesets 20321 and 20521 added support for
> description in xend domain config.  This patch extends that
> support in xend backend.
> ---
>  src/xen/xend_internal.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> Index: libvirt-0.7.4/src/xen/xend_internal.c
> ===================================================================
> --- libvirt-0.7.4.orig/src/xen/xend_internal.c
> +++ libvirt-0.7.4/src/xen/xend_internal.c
> @@ -2360,6 +2360,9 @@ xenDaemonParseSxpr(virConnectPtr conn,
>      }
>      virUUIDParse(tmp, def->uuid);
>  
> +    if (sexpr_node_copy(root, "domain/description", &def->description) < 0)
> +        goto no_memory;
> +
>      hvm = sexpr_lookup(root, "domain/image/hvm") ? 1 : 0;
>      if (!hvm) {
>          if (sexpr_node_copy(root, "domain/bootloader",
> @@ -5676,6 +5679,9 @@ xenDaemonFormatSxpr(virConnectPtr conn,
>      virUUIDFormat(def->uuid, uuidstr);
>      virBufferVSprintf(&buf, "(uuid '%s')", uuidstr);
>  
> +    if (def->description)
> +        virBufferVSprintf(&buf, "(description '%s')", def->description);
> +
>      if (def->os.bootloader) {
>          if (def->os.bootloader[0])
>              virBufferVSprintf(&buf, "(bootloader '%s')", def->os.bootloader);

  Okidoc, makes sense, pushed, thanks :-)

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list