Package: lshw
Version: 02.16-1
Tags: patch
Severity: important

lshw may detect only 1 cpu core on devicetree-based platforms with > 1
core. I've reported this upstream:
  http://ezix.org/project/ticket/626

Attached is the patch I've provided, which is pending moderation
upstream.
--- ./lshw-02.16/src/core/device-tree.cc.orig	2013-05-07 14:57:16.400177000 -0400
+++ ./lshw-02.16/src/core/device-tree.cc	2013-05-07 15:01:51.710177000 -0400
@@ -193,7 +193,8 @@
       struct dirent **cachelist;
       int ncache;
 
-      if (hw::strip(get_string(basepath + "/device_type")) != "cpu")
+      if (exists(basepath + "/device_type") &&
+        hw::strip(get_string(basepath + "/device_type")) != "cpu")
         break;                                    // oops, not a CPU!
 
       cpu.setProduct(get_string(basepath + "/name"));

Reply via email to