[PATCH 5/6] util: Tweak s390(x) case for CPU frequency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We're going to use this branch for all architectures which don't
have a way to report the CPU frequency, so remove references to
any specific architecture.

Avoid setting the output value again, too, since it is set to
zero at the beginning of the function already.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/util/virhostcpu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index e74125147..3b478fc45 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -567,9 +567,7 @@ virHostCPUGetInfoParseCPUInfo(FILE *cpuinfo,
             if (virHostCPUGetInfoParseCPUFrequency(line, "BogoMIPS", mhz) < 0)
                 goto cleanup;
         } else if (ARCH_IS_S390(arch)) {
-            /* s390x has no realistic value for CPU speed,
-             * assign a value of zero to signify this */
-            *mhz = 0;
+            /* No reasonable way to obtain CPU frequency */
         } else {
             VIR_WARN("Parser for /proc/cpuinfo needs to be adapted for your architecture");
             break;
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux