Skip to content

Commit 01b0180

Browse files
Vasant Hegdestewartsmith
authored andcommitted
hdat: Populate model property with 'Unknown' in error path
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@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
1 parent c8643db commit 01b0180

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hdata/vpd.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,14 @@ static void sysvpd_parse_opp(const void *sysvpd, unsigned int sysvpd_sz)
535535
v = vpd_find(sysvpd, sysvpd_sz, "OSYS", "MM", &sz);
536536
if (v)
537537
dt_add_property_nstr(dt_root, "model", v, sz);
538+
else
539+
dt_add_property_string(dt_root, "model", "Unknown");
540+
538541
v = vpd_find(sysvpd, sysvpd_sz, "OSYS", "SS", &sz);
539542
if (v)
540543
dt_add_property_nstr(dt_root, "system-id", v, sz);
544+
else
545+
dt_add_property_string(dt_root, "system-id", "Unknown");
541546
}
542547

543548

0 commit comments

Comments
 (0)