[Skiboot] [PATCH 1/4] hdat: Populate model property with 'Unknown' in error path

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Sun Apr 2 21:07:26 AEST 2017


Linux kernel refers to model and sytem-id properties. Also some of
the user space tools refers these properties. Hence in error path
fill model/system-id property with "Unknown".

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hdata/vpd.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hdata/vpd.c b/hdata/vpd.c
index 639fa33..1533f3f 100644
--- a/hdata/vpd.c
+++ b/hdata/vpd.c
@@ -535,9 +535,14 @@ static void sysvpd_parse_opp(const void *sysvpd, unsigned int sysvpd_sz)
 	v = vpd_find(sysvpd, sysvpd_sz, "OSYS", "MM", &sz);
 	if (v)
 		dt_add_property_nstr(dt_root, "model", v, sz);
+	else
+		dt_add_property_string(dt_root, "model", "Unknown");
+
 	v = vpd_find(sysvpd, sysvpd_sz, "OSYS", "SS", &sz);
 	if (v)
 		dt_add_property_nstr(dt_root, "system-id", v, sz);
+	else
+		dt_add_property_string(dt_root, "system-id", "Unknown");
 }
 
 
-- 
2.9.3



More information about the Skiboot mailing list