lscpu: fix bogomips detection for s390
PATCH 1/1 lscpu: fix bogomips detection for s390
From: Heiko Carstens <[email protected]>
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 <[email protected]>
--- sys-utils/lscpu.c | 2 ++ 1 file changed, 2 insertions(+)
sys-utils/lscpu.c +2 -0
@@ -369,6 +369,8 @@ read_basicinfo(struct lscpu_desc *desc)else if (lookup (buf,"cpu MHz" , &desc->mhz)) ;else if (lookup (buf,"flags" , &desc->flags)) ;else if (lookup (buf,"bogomips" , &desc->bogomips)) ; +/* S390 */ +else if (lookup (buf,"bogomips per cpu" , &desc->bogomips)) ;else continue ; }
Quoted 2 lines · Heiko Carstens
sys-utils/lscpu.c | 2 ++ 1 file changed, 2 insertions(+)
Applied, thanks.
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com