Skip to content

Commit

Permalink
hdat: Populate model property with 'Unknown' in error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasant Hegde authored and stewartsmith committed Apr 5, 2017
1 parent c8643db commit 01b0180
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hdata/vpd.c
Expand Up @@ -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");
}


Expand Down

0 comments on commit 01b0180

Please sign in to comment.