]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
S390: Fixed Parser for /proc/cpuinfo needs to be adapted for your architecture
authorThang Pham <thang.pham@us.ibm.com>
Fri, 22 Jun 2012 11:50:12 +0000 (13:50 +0200)
committerCole Robinson <crobinso@redhat.com>
Sun, 12 Aug 2012 23:22:10 +0000 (19:22 -0400)
Minimal CPU "parser" for s390 to avoid compile time warning.

Signed-off-by: Thang Pham <thang.pham@us.ibm.com>
Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
(cherry picked from commit bf2e40fac034428d51efbab4a39cfe3c56132786)

(crobinso: Add Thang to AUTHORS)

AUTHORS
src/nodeinfo.c

diff --git a/AUTHORS b/AUTHORS
index 5a4e4955dab8021329e1eb41270b9237ba8fdbaa..aef9a2ef629f6b71ed46516dada246c9a811bf51 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -238,6 +238,7 @@ Patches have also been contributed by:
   Gao feng             <gaofeng@cn.fujitsu.com>
   Dipankar Sarma       <dipankar@in.ibm.com>
   Viktor Mihajlovski   <mihajlov@linux.vnet.ibm.com>
+  Thang Pham           <thang.pham@us.ibm.com>
 
   [....send patches to get your name here....]
 
index 56b9f54cdbc30da0590ca937abdca46a85fea42d..3594ec25cc16b35e0b053518293f5393d5fd288f 100644 (file)
@@ -275,6 +275,11 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
              * and parsed in next iteration, because it is not in expected
              * format and thus lead to error. */
         }
+# elif defined(__s390__) || \
+      defined(__s390x__)
+        /* s390x has no realistic value for CPU speed,
+         * assign a value of zero to signify this */
+        nodeinfo->mhz = 0;
 # else
 #  warning Parser for /proc/cpuinfo needs to be adapted for your architecture
 # endif