summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys-utils/lscpu.c5
-rw-r--r--tests/expected/lscpu/lscpu-i386-dellpe7001
2 files changed, 5 insertions, 1 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index c3bb536cd..d3abb98b7 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -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
diff --git a/tests/expected/lscpu/lscpu-i386-dellpe700 b/tests/expected/lscpu/lscpu-i386-dellpe700
index d1d95c79d..8e9f62059 100644
--- a/tests/expected/lscpu/lscpu-i386-dellpe700
+++ b/tests/expected/lscpu/lscpu-i386-dellpe700
@@ -1,4 +1,3 @@
-CPU op-mode(s): 32-bit
CPU(s): 2
Thread(s) per core: 2
Core(s) per socket: 1