From d838a6bca8fa589935c33855cfa6322df49179a4 Mon Sep 17 00:00:00 2001 From: Thang Pham Date: Fri, 22 Jun 2012 13:50:12 +0200 Subject: [PATCH] S390: Fixed Parser for /proc/cpuinfo needs to be adapted for your architecture Minimal CPU "parser" for s390 to avoid compile time warning. Signed-off-by: Thang Pham Signed-off-by: Viktor Mihajlovski (cherry picked from commit bf2e40fac034428d51efbab4a39cfe3c56132786) (crobinso: Add Thang to AUTHORS) --- AUTHORS | 1 + src/nodeinfo.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/AUTHORS b/AUTHORS index 5a4e4955da..aef9a2ef62 100644 --- a/AUTHORS +++ b/AUTHORS @@ -238,6 +238,7 @@ Patches have also been contributed by: Gao feng Dipankar Sarma Viktor Mihajlovski + Thang Pham [....send patches to get your name here....] diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 56b9f54cdb..3594ec25cc 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -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