xen/xend-cpuinfo-model-name.patch

25 lines
925 B
Diff
Raw Normal View History

References: bnc#814709
For cpus that contain additional ':' characters in their name
Index: xen-4.4.0-testing/tools/python/xen/xend/osdep.py
===================================================================
--- xen-4.4.0-testing.orig/tools/python/xen/xend/osdep.py
+++ xen-4.4.0-testing/tools/python/xen/xend/osdep.py
@@ -143,10 +143,14 @@ def _linux_get_cpuinfo():
d = {}
for line in f:
keyvalue = line.split(':')
- if len(keyvalue) != 2:
+ if len(keyvalue) < 2:
continue
key = keyvalue[0].strip()
- val = keyvalue[1].strip()
+ for i in range(1, len(keyvalue)):
+ if i == 1:
+ val = keyvalue[i].lstrip()
+ else:
+ val = val + ":" + keyvalue[i]
if key == 'processor':
if p != -1:
cpuinfo[p] = d