]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: fix bogomips detection for s390
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 21 Jun 2011 11:24:33 +0000 (13:24 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 27 Jun 2011 14:13:48 +0000 (16:13 +0200)
s390 has a "bogomips per cpu" string instead of a "bogomips" string in
/proc/sysinfo. So add a second bogomips lookup which detects the s390
variant.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
sys-utils/lscpu.c

index 8edf99706cc7029e1faee92a1adc41aebef4a10a..0c49b5447ec3a4cb0c40825e149b5d5f4933460e 100644 (file)
@@ -390,6 +390,8 @@ read_basicinfo(struct lscpu_desc *desc)
                else if (lookup(buf, "features", &desc->flags)) ;       /* s390 */
                else if (lookup(buf, "type", &desc->flags)) ;           /* sparc64 */
                else if (lookup(buf, "bogomips", &desc->bogomips)) ;
+               /* S390 */
+               else if (lookup(buf, "bogomips per cpu", &desc->bogomips)) ;
                else
                        continue;
        }