SHA256
1
0
forked from pool/libvirt
libvirt/xend-description-tag.patch

37 lines
1.4 KiB
Diff

From acba9b620128c4dcdbb95a1ea06604f3013a0518 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@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);