libvirt/094c6f4a-hap-fix.patch

33 lines
1.4 KiB
Diff
Raw Normal View History

commit 094c6f4a24165d2d07f64bbd70243b3306a34d5b
Author: Jim Fehlig <jfehlig@novell.com>
Date: Fri Jan 14 11:12:46 2011 -0700
Fix 'make check' after commit 04197350
I broke 'make check' with commit 04197350 by unconditionally
emitting 'hap=' in xen xm driver. Only emit 'hap=' if
xendConfigVersion >= 3. I've tested sending 'hap=' to a Xen 3.2
machine without support for hap setting and verified that xend
silently drops the unrecognized setting.
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index ec618aa..bfb6698 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -2413,10 +2413,11 @@ virConfPtr xenXMDomainConfigFormat(virConnectPtr conn,
(1 << VIR_DOMAIN_FEATURE_APIC)) ? 1 : 0) < 0)
goto no_memory;
- if (xenXMConfigSetInt(conf, "hap",
- (def->features &
- (1 << VIR_DOMAIN_FEATURE_HAP)) ? 1 : 0) < 0)
- goto no_memory;
+ if (priv->xendConfigVersion >= 3)
+ if (xenXMConfigSetInt(conf, "hap",
+ (def->features &
+ (1 << VIR_DOMAIN_FEATURE_HAP)) ? 1 : 0) < 0)
+ goto no_memory;
if (def->clock.offset == VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME) {
if (def->clock.data.timezone) {