]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: fix op-mode for /{sys,proc} dumps
authorKarel Zak <kzak@redhat.com>
Thu, 31 Mar 2011 11:09:50 +0000 (13:09 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 31 Mar 2011 11:09:50 +0000 (13:09 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lscpu.c
tests/expected/lscpu/lscpu-i386-dellpe700

index c3bb536cd60e3428b8c25f103fb068066455ac01..d3abb98b78fffeb61b7ce06431ca3751a334ee9c 100644 (file)
@@ -342,6 +342,11 @@ init_mode(void)
 {
        int m = 0;
 
+       if (sysrootlen)
+               /* reading info from any /{sys,proc} dump, don't mix it with
+                * information about our real CPU */
+               return 0;
+
 #if defined(__alpha__) || defined(__ia64__)
        m |= MODE_64BIT;        /* 64bit platforms only */
 #endif
index d1d95c79d7ba9a9fe1dc17ba528dd57ba731ed06..8e9f62059f5525e087f9444cbf30e5b7c8245c23 100644 (file)
@@ -1,4 +1,3 @@
-CPU op-mode(s):        32-bit
 CPU(s):                2
 Thread(s) per core:    2
 Core(s) per socket:    1