]> 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>
Tue, 19 Apr 2011 11:09:53 +0000 (13:09 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lscpu.c
tests/expected/lscpu/lscpu-i386-dellpe700

index 17cf052037a08bd91686507a2d5299f711b76ee7..133b0c3513f44cf271049dfbe63854df0e7dabb0 100644 (file)
@@ -350,6 +350,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