xen/xm-create-maxmem.patch

20 lines
685 B
Diff
Raw Normal View History

Cast maxmem to int before computation
Reported in L3 bnc#732782
From: Dario Abatianni <dabatianni@novell.com>
Index: xen-4.2.0-testing/tools/python/xen/xm/xenapi_create.py
===================================================================
--- xen-4.2.0-testing.orig/tools/python/xen/xm/xenapi_create.py
+++ xen-4.2.0-testing/tools/python/xen/xm/xenapi_create.py
@@ -764,7 +764,7 @@ class sxp2xml:
if get_child_by_name(config, "maxmem"):
memory.attributes["static_max"] = \
- str(int(get_child_by_name(config, "maxmem")*1024*1024))
+ str(int(get_child_by_name(config, "maxmem"))*1024*1024)
vm.appendChild(memory)