Blame SOURCES/0022-devtree-Fix-motherboard-model-reporting.patch

99c779
From b409777707752adddbbd9fd33b5388825f8a032e Mon Sep 17 00:00:00 2001
99c779
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
99c779
Date: Fri, 21 Oct 2016 11:08:34 +0530
99c779
Subject: [PATCH 22/43] devtree: Fix motherboard model reporting
99c779
99c779
We have 'model' property on all Power System. Some system has
99c779
'model-name' property which is more descriptive.
99c779
99c779
Append 'model-name' info to product instead of overwriting it.
99c779
99c779
Sample output:
99c779
tul176p1
99c779
    description: PowerNV
99c779
    product: 8286-42A (IBM Power System S824)
99c779
99c779
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
99c779
---
99c779
 src/core/device-tree.cc | 6 +++++-
99c779
 1 file changed, 5 insertions(+), 1 deletion(-)
99c779
99c779
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
99c779
index 951535c..c60e49c 100644
99c779
--- a/src/core/device-tree.cc
99c779
+++ b/src/core/device-tree.cc
99c779
@@ -926,7 +926,11 @@ bool scan_device_tree(hwNode & n)
99c779
   if (matches(get_string(DEVICETREE "/compatible"), "^ibm,powernv"))
99c779
   {
99c779
     n.setVendor(get_string(DEVICETREE "/vendor", "IBM"));
99c779
-    n.setProduct(get_string(DEVICETREE "/model-name"));
99c779
+
99c779
+    if (exists(DEVICETREE "/model-name"))
99c779
+      n.setProduct(n.getProduct() + " (" +
99c779
+		   hw::strip(get_string(DEVICETREE "/model-name")) + ")");
99c779
+
99c779
     n.setDescription("PowerNV");
99c779
     if (core)
99c779
     {
99c779
-- 
99c779
2.10.2
99c779