]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix 'make check' after commit 04197350
authorJim Fehlig <jfehlig@novell.com>
Fri, 14 Jan 2011 18:12:46 +0000 (11:12 -0700)
committerJim Fehlig <jfehlig@novell.com>
Fri, 14 Jan 2011 18:49:52 +0000 (11:49 -0700)
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.

src/xen/xm_internal.c

index ec618aa428dbb09657a824172fb0a2d1910d36bf..bfb669801006d9e8f3072501acab839dce0fa6c0 100644 (file)
@@ -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) {