Blame SOURCES/0042-Avoid-crash-on-device-tree-parsing.patch

121cca
From 2017dad4e66ec7c9e6b25d551c6867107b958ddd Mon Sep 17 00:00:00 2001
121cca
From: Lyonel Vincent <lyonel@ezix.org>
121cca
Date: Sun, 10 Jan 2021 00:57:48 +0100
121cca
Subject: [PATCH 42/65] Avoid crash on device-tree parsing
121cca
121cca
cf. Github PR#58
121cca
---
121cca
 src/core/device-tree.cc | 3 ++-
121cca
 1 file changed, 2 insertions(+), 1 deletion(-)
121cca
121cca
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
121cca
index 027ad16..d3188c6 100644
121cca
--- a/src/core/device-tree.cc
121cca
+++ b/src/core/device-tree.cc
121cca
@@ -1506,7 +1506,8 @@ bool scan_device_tree(hwNode & n)
121cca
         scan_devtree_cpu_power(*core);
121cca
       }
121cca
       else {
121cca
-        scan_devtree_cpu(*core);
121cca
+        if (exists(DEVICETREE "/cpus"))
121cca
+          scan_devtree_cpu(*core);
121cca
       }
121cca
       scan_devtree_memory(*core);
121cca
       scan_devtree_memory_ibm(*core);
121cca
-- 
121cca
2.33.1
121cca